[mutter] Resize the guard window when the X screen is resized.



commit 472662d0996b0b4db6355864c6e7944d31d3d62b
Author: Benjamin Berg <benjamin sipsolutions net>
Date:   Sun Oct 14 12:16:06 2012 +0200

    Resize the guard window when the X screen is resized.
    
    Fixes bug #670396. Without this fix the guard window may not
    extend over the whole area of the screen after a XRandR
    reconfiguration. The effect being that mouse events are
    delivered to invisible windows.

 src/core/screen.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/core/screen.c b/src/core/screen.c
index db9b5ed..e49f7d0 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -2878,6 +2878,22 @@ meta_screen_resize (MetaScreen *screen,
   reload_monitor_infos (screen);
   set_desktop_geometry_hint (screen);
 
+  /* Resize the guard window to fill the screen again. */
+  if (screen->guard_window != None)
+    {
+      XWindowChanges changes;
+
+      changes.x = 0;
+      changes.y = 0;
+      changes.width = width;
+      changes.height = height;
+
+      XConfigureWindow(screen->display->xdisplay,
+                       screen->guard_window,
+                       CWX | CWY | CWWidth | CWHeight,
+                       &changes);
+    }
+
   if (screen->display->compositor)
     meta_compositor_sync_screen_size (screen->display->compositor,
 				      screen, width, height);



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