]> Dogcows Code - chaz/openbox/commitdiff
fix possible seg because of new move code. make sure that the masked_window pointer...
authorDana Jansens <danakj@orodu.net>
Wed, 1 May 2002 07:13:12 +0000 (07:13 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 1 May 2002 07:13:12 +0000 (07:13 +0000)
src/Window.cc

index f722902a232df9d91cb5178dcc80e6209e143d83..431d3167f0ad72a0a79453820fea02a159b5d450 100644 (file)
@@ -2283,6 +2283,9 @@ void OpenboxWindow::unmapNotifyEvent(XUnmapEvent *ue) {
     openbox.grab();
     if (! validateClient()) return;
 
+    if (flags.moving)
+      endMove();
+    
     XChangeSaveSet(display, client.window, SetModeDelete);
     XSelectInput(display, client.window, NoEventMask);
 
@@ -2318,6 +2321,8 @@ void OpenboxWindow::unmapNotifyEvent(XUnmapEvent *ue) {
 
 void OpenboxWindow::destroyNotifyEvent(XDestroyWindowEvent *de) {
   if (de->window == client.window) {
+    if (flags.moving)
+      endMove();
     XUnmapWindow(display, frame.window);
 
     delete this;
@@ -2754,9 +2759,8 @@ 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)
+  OpenboxWindow *w = openbox.getMaskedWindow();
+  if (w != (OpenboxWindow *) 0 && w->flags.moving)
     w->endMove();
   
   XGrabPointer(display, frame.window, False, PointerMotionMask |
This page took 0.029316 seconds and 4 git commands to generate.