]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
clarify an incorrect comment, and make some funcs const
[chaz/openbox] / src / client.cc
index 72a98afbf7338f4602494380ac214abbb525683e..026f4f2f8bd6b7aad78f12ded2fda0c7a52dab0b 100644 (file)
@@ -921,9 +921,11 @@ void OBClient::clientMessageHandler(const XClientMessageEvent &e)
 void OBClient::shapeHandler(const XShapeEvent &e)
 {
   otk::OtkEventHandler::shapeHandler(e);
-  
-  _shaped = e.shaped;
-  frame->adjustShape();
+
+  if (e.kind == ShapeBounding) {
+    _shaped = e.shaped;
+    frame->adjustShape();
+  }
 }
 #endif
 
@@ -995,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();
 }
 
 
@@ -1216,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
@@ -1264,7 +1270,7 @@ void OBClient::reparentHandler(const XReparentEvent &e)
   */
 
   // this deletes us etc
-  Openbox::instance->screen(_screen)->unmanageWindow(this);
+  Openbox::instance->screen(_screen)->unmanageWindow(this, true);
 }
 
 }
This page took 0.024968 seconds and 4 git commands to generate.