mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-03-14 00:58:16 +03:00
virt-viewer-display-spice: Get monitor under our window
When getting monitor info for going fullscreen, Get the monitor under *our* window rather then under the root-window. Noticed this not working properly when testing the monitor coordinates stuff, but this should also help people seeing problems when using non equally sized monitors. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
b6af879d19
commit
412bcf6f7f
@ -200,7 +200,8 @@ virt_viewer_display_spice_size_allocate(VirtViewerDisplaySpice *self,
|
||||
GdkRectangle monitor;
|
||||
GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(self));
|
||||
GdkWindow *window = gtk_widget_get_root_window(GTK_WIDGET(self));
|
||||
int n = gdk_screen_get_monitor_at_window(screen, window);
|
||||
int n = gdk_screen_get_monitor_at_window(screen,
|
||||
gtk_widget_get_window(GTK_WIDGET(self)));
|
||||
gdk_screen_get_monitor_geometry(screen, n, &monitor);
|
||||
dw = monitor.width;
|
||||
dh = monitor.height;
|
||||
|
Loading…
x
Reference in New Issue
Block a user