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);
// 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);
+ client->toggleClientBorder(false);
// specify that if we exit, the window should not be destroyed and should be
// reparented back to root automatically
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);
XSelectInput(otk::OBDisplay::display, client->window(), NoEventMask);
frame->hide();
-
- // we dont want a border on the client
- XSetWindowBorderWidth(otk::OBDisplay::display, client->window(),
- client->borderWidth());
+
+ // give the client its border back
+ client->toggleClientBorder(true);
delete client->frame;
client->frame = 0;