X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fscreen.cc;h=22d5d1be43567f610c9ec08a546f0eaf38df70f3;hb=143d2df034e1304c1d9672226bd71f01533a1a63;hp=3c6731c2c940ad5732bbd241bc88352922219d77;hpb=dca0c9f5a308e115ec308cdc8ca7987ff4fc0479;p=chaz%2Fopenbox diff --git a/src/screen.cc b/src/screen.cc index 3c6731c2..22d5d1be 100644 --- a/src/screen.cc +++ b/src/screen.cc @@ -350,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); @@ -384,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);