]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
handle mouse motion too
[chaz/openbox] / src / client.cc
index 0fd5787b8669be2c2b92a88532731108089ccc4e..aef3dcbafe59287545e44203ee20cc35cf502285 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "client.hh"
 #include "frame.hh"
+#include "screen.hh"
 #include "bbscreen.hh"
 #include "openbox.hh"
 #include "otk/display.hh"
@@ -30,8 +31,6 @@ OBClient::OBClient(int screen, Window window)
   assert(screen >= 0);
   assert(window);
 
-  Openbox::instance->registerHandler(_window, this);
-
   ignore_unmaps = 0;
   
   // update EVERYTHING the first time!!
@@ -772,6 +771,8 @@ void OBClient::move(int x, int y)
 
 void OBClient::configureRequestHandler(const XConfigureRequestEvent &e)
 {
+  OtkEventHandler::configureRequestHandler(e);
+  
   // XXX: if we are iconic (or shaded? (fvwm does that)) ignore the event
 
   if (e.value_mask & CWBorderWidth)
@@ -825,4 +826,35 @@ void OBClient::configureRequestHandler(const XConfigureRequestEvent &e)
 }
 
 
+void OBClient::unmapHandler(const XUnmapEvent &e)
+{
+#ifdef    DEBUG
+  printf("UnmapNotify for 0x%lx\n", e.window);
+#endif // DEBUG
+
+  if (ignore_unmaps) {
+    ignore_unmaps--;
+    return;
+  }
+  
+  OtkEventHandler::unmapHandler(e);
+
+  // this deletes us etc
+  Openbox::instance->screen(_screen)->unmanageWindow(this);
+}
+
+
+void OBClient::destroyHandler(const XDestroyWindowEvent &e)
+{
+#ifdef    DEBUG
+  printf("DestroyNotify for 0x%lx\n", e.window);
+#endif // DEBUG
+
+  OtkEventHandler::destroyHandler(e);
+
+  // this deletes us etc
+  Openbox::instance->screen(_screen)->unmanageWindow(this);
+}
+
+
 }
This page took 0.022785 seconds and 4 git commands to generate.