mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-05 05:26:27 +00:00
app: Do not map display to non-existent monitor
This commit is contained in:
parent
4d6f730fce
commit
1f2ef0e9de
@ -350,6 +350,10 @@ gint virt_viewer_app_get_initial_monitor_for_display(VirtViewerApp* self, gint d
|
||||
monitor = -1;
|
||||
}
|
||||
}
|
||||
if (monitor >= get_n_client_monitors()) {
|
||||
g_debug("monitor for display %d does not exist", display);
|
||||
monitor = -1;
|
||||
}
|
||||
|
||||
return monitor;
|
||||
}
|
||||
@ -359,7 +363,7 @@ app_window_try_fullscreen(VirtViewerApp *self G_GNUC_UNUSED,
|
||||
VirtViewerWindow *win, gint nth)
|
||||
{
|
||||
gint monitor = virt_viewer_app_get_initial_monitor_for_display(self, nth);
|
||||
if (monitor == -1 || monitor >= get_n_client_monitors()) {
|
||||
if (monitor == -1) {
|
||||
g_debug("skipping fullscreen for display %d", nth);
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user