[PATCH 2/2] virt-viewer-display-spice: Get monitor under our window

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/virt-viewer-display-spice.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c
index e689d9d..2f6bdd4 100644
--- a/src/virt-viewer-display-spice.c
+++ b/src/virt-viewer-display-spice.c
@@ -201,7 +201,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);
         x = monitor.x;
         y = monitor.y;
-- 
1.8.0.2

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux