]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
code style fix
[chaz/openbox] / src / client.cc
index 38364432418a019549dfad589163ec1a356631d4..2461eff9161856005d306ea8993cbc889c58c434 100644 (file)
@@ -1002,4 +1002,26 @@ void OBClient::destroyHandler(const XDestroyWindowEvent &e)
 }
 
 
+void OBClient::reparentHandler(const XReparentEvent &e)
+{
+#ifdef    DEBUG
+  printf("ReparentNotify for 0x%lx\n", e.window);
+#endif // DEBUG
+
+  OtkEventHandler::reparentHandler(e);
+
+  // this is when the client is first taken captive in the frame
+  if (e.parent == frame->plate()) return;
+
+  /*
+    This event is quite rare and is usually handled in unmapHandler.
+    However, if the window is unmapped when the reparent event occurs,
+    the window manager never sees it because an unmap event is not sent
+    to an already unmapped window.
+  */
+
+  // this deletes us etc
+  Openbox::instance->screen(_screen)->unmanageWindow(this);
+}
+
 }
This page took 0.020104 seconds and 4 git commands to generate.