ecere/gui/XInterface: (#850) Fixed unmaximizing issue on GNOME Flashback (Metacity)
authorJerome St-Louis <jerome@ecere.com>
Thu, 17 Jul 2014 18:09:39 +0000 (14:09 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 17 Jul 2014 18:09:39 +0000 (14:09 -0400)
- Fixed absPosition of menu bar not being set to proper value after unmaximizing
  through dragging window on GNOME Flashback (Metacity)
- This was causing menu bar to not be redrawn / processing clicks properly
- Passing value of 'unmaximized' to 'force', which was previously changed to false
  by f3ece7c9aaada43876cb424132b7f56259033a9a (avoiding forcing on stacking only changes)
- A fix for a seemingly similar problem on Unity ( 85ad13a7fd22eae3ed60f29ff69c912635a97dfb )
  may have contributed to this problem, as it prevented resetting the root window state

ecere/src/gui/drivers/XInterface.ec

index ccfb10e..a572f1a 100644 (file)
@@ -2152,11 +2152,11 @@ class XInterface : Interface
                {
                   XConfigureEvent * event = (XConfigureEvent *) thisEvent;
                   bool unmaximized = false;
+                  bool um = false;
                   if(!window.visible || fullScreenMode) break;
                   while(XCheckIfEvent(xGlobalDisplay, (XEvent *)thisEvent, (void *)ConfigureNotifyChecker, (void *)window.windowHandle));
                   //if(event->x - desktopX != window.position.x || event->y - desktopY != window.position.y || event->width != window.size.w || event->height != window.size.h)
-
-                  X11UpdateState(window, &unmaximized);
+                  X11UpdateState(window, &um);
                   unmaximized = false;
                   {
                      bool offset = false;
@@ -2206,7 +2206,7 @@ class XInterface : Interface
                         }
                      }
 
-                     window.Position(x, y, w, h, false /*true*/, true, true, true, false, unmaximized);
+                     window.Position(x, y, w, h, um /*false /*true*/, true, true, true, false, unmaximized);
 
                      // Break the anchors for moveable/resizable windows
                      // Avoid doing this if the translation wasn't in sync as it will cause the window to move around