Ensure network status panel doesn't go offscreen
This commit is contained in:
parent
d6000306c7
commit
3da02638d1
@ -359,7 +359,11 @@ static void show_network_status(void) {
|
||||
if (!netstat->window) {
|
||||
menu_show(netstat, yctx);
|
||||
if (netstat->window) {
|
||||
yutani_window_move(yctx, netstat->window, netstat_left, PANEL_HEIGHT);
|
||||
if (netstat_left + netstat->window->width > (unsigned int)width) {
|
||||
yutani_window_move(yctx, netstat->window, width - netstat->window->width, PANEL_HEIGHT);
|
||||
} else {
|
||||
yutani_window_move(yctx, netstat->window, netstat_left, PANEL_HEIGHT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user