]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
handle unmaps better. all thanks to acroread sending wacky unmap events
[chaz/openbox] / src / client.cc
index 70673c50ce53ab1884ed88db2cbd3bbc34fab1dd..d38ca79b0e39a613618b83e8215d17eedc5fdf38 100644 (file)
@@ -997,7 +997,8 @@ void OBClient::move(int x, int y)
   _area.setPos(x, y);
 
   // move the frame to be in the requested position
-  frame->adjustPosition();
+  if (frame) // this can be called while mapping, before frame exists
+    frame->adjustPosition();
 }
 
 
@@ -1218,15 +1219,18 @@ void OBClient::configureRequestHandler(const XConfigureRequestEvent &e)
 
 void OBClient::unmapHandler(const XUnmapEvent &e)
 {
+  if (ignore_unmaps) {
 #ifdef    DEBUG
-  printf("UnmapNotify for 0x%lx\n", e.window);
+    printf("Ignored UnmapNotify for 0x%lx (event 0x%lx)\n", e.window, e.event);
 #endif // DEBUG
-
-  if (ignore_unmaps) {
     ignore_unmaps--;
     return;
   }
   
+#ifdef    DEBUG
+  printf("UnmapNotify for 0x%lx\n", e.window);
+#endif // DEBUG
+
   OtkEventHandler::unmapHandler(e);
 
   // this deletes us etc
This page took 0.021748 seconds and 4 git commands to generate.