]> Dogcows Code - chaz/openbox/blobdiff - src/screen.cc
handle mouse motion too
[chaz/openbox] / src / screen.cc
index 4457096b240a35c680331b594c5b232acf233d18..22d5d1be43567f610c9ec08a546f0eaf38df70f3 100644 (file)
@@ -37,7 +37,8 @@ namespace ob {
 
 
 OBScreen::OBScreen(int screen, const otk::Configuration &config)
-  : _number(screen)
+  : _number(screen),
+    _root(screen)
 {
   assert(screen >= 0); assert(screen < ScreenCount(otk::OBDisplay::display));
   _info = otk::OBDisplay::screenInfo(screen);
@@ -349,6 +350,8 @@ void OBScreen::manageWindow(Window window)
 
   // create the OBClient class, which gets all of the hints on the window
   Openbox::instance->addClient(window, client = new OBClient(_number, window));
+  // register for events
+  Openbox::instance->registerHandler(window, client);
 
   // we dont want a border on the client
   XSetWindowBorderWidth(otk::OBDisplay::display, window, 0);
@@ -383,6 +386,11 @@ void OBScreen::unmanageWindow(OBClient *client)
   OBFrame *frame = client->frame;
 
   // XXX: pass around focus if this window was focused
+
+  // remove from the wm's map
+  Openbox::instance->removeClient(client->window());
+  // unregister for handling events
+  Openbox::instance->clearHandler(client->window());
   
   // remove the window from our save set
   XChangeSaveSet(otk::OBDisplay::display, client->window(), SetModeDelete);
This page took 0.024984 seconds and 4 git commands to generate.