]> Dogcows Code - chaz/openbox/commitdiff
when a window begins moving, make sure another window is not moving already, and...
authorDana Jansens <danakj@orodu.net>
Tue, 30 Apr 2002 08:09:53 +0000 (08:09 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 30 Apr 2002 08:09:53 +0000 (08:09 +0000)
src/Window.cc
src/openbox.h

index c8c3760b917c2efe8f9a547bb2eb914d8b74bc52..f722902a232df9d91cb5178dcc80e6209e143d83 100644 (file)
@@ -1472,12 +1472,6 @@ void OpenboxWindow::deiconify(bool reassoc, bool raise, bool initial) {
   // after the window is mapped, we need to start interactively moving it
   if (initial && place_window &&
       screen->placementPolicy() == BScreen::ClickMousePlacement) {
-    // if the last window wasn't placed yet, or we're just moving a window
-    // already, finish off that move cleanly
-    OpenboxWindow *w = openbox.getFocusedWindow();
-    if (w != (OpenboxWindow *) 0 && w->flags.moving)
-      w->endMove();
-
     int x, y, rx, ry;
     Window c, r;
     unsigned int m;
@@ -2759,6 +2753,12 @@ void OpenboxWindow::buttonReleaseEvent(XButtonEvent *re) {
 void OpenboxWindow::startMove(int x, int y) {
   ASSERT(!flags.moving);
 
+  // make sure only one window is moving at a time
+  OpenboxWindow *w;
+  if ((w = openbox.getMaskedWindow()) != (OpenboxWindow *) 0 &&
+      w->flags.moving)
+    w->endMove();
+  
   XGrabPointer(display, frame.window, False, PointerMotionMask |
                ButtonReleaseMask, GrabModeAsync, GrabModeAsync,
                None, openbox.getMoveCursor(), CurrentTime);
index eae8bcff544f1901a42811711d11ac9489e684cb..8135a329d4e53b654dcd1dd65fd37208cd1c9811 100644 (file)
@@ -172,6 +172,8 @@ public:
   inline const unsigned long &getCacheMax() const
     { return resource.cache_max; }
 
+  inline OpenboxWindow *getMaskedWindow() const
+    { return masked_window; }
   inline void maskWindowEvents(Window w, OpenboxWindow *bw)
     { masked = w; masked_window = bw; }
   inline void setNoFocus(Bool f) { no_focus = f; }
This page took 0.02591 seconds and 4 git commands to generate.