all repos — openbox @ 34896278038205494cd41a1cab0818ea8eef16f3

openbox fork - make it a bit more like ryudo

add some comments
clean up the releasing of the client from the frame
Dana Jansens danakj@orodu.net
commit

34896278038205494cd41a1cab0818ea8eef16f3

parent

7e41036491e59cdbd2579aeaf672c593458d8e16

1 files changed, 10 insertions(+), 10 deletions(-)

jump to
M src/screen.ccsrc/screen.cc

@@ -284,7 +284,6 @@ // create the netwm support window

_supportwindow = XCreateSimpleWindow(otk::OBDisplay::display, _info->rootWindow(), 0, 0, 1, 1, 0, 0, 0); - assert(_supportwindow != None); // set supporting window Openbox::instance->property()->set(_info->rootWindow(),

@@ -547,11 +546,13 @@ EventData *data = new_event_data(_number, window, EventNewWindow, 0);

Openbox::instance->bindings()->fireEvent(data); Py_DECREF((PyObject*)data); +#ifdef DEBUG printf("Managed window 0x%lx\n", window); +#endif } -void OBScreen::unmanageWindow(OBClient *client, bool reparented) +void OBScreen::unmanageWindow(OBClient *client) { OBFrame *frame = client->frame;

@@ -590,14 +591,9 @@

// give the client its border back client->toggleClientBorder(true); - if (!reparented) - // reparent the window out of the frame - frame->releaseClient(); - else - // the client is already reparented, so, since we unmapped the window - // above, we remap it here. aren't we nice? :) - XMapWindow(otk::OBDisplay::display, client->window()); - + // reparent the window out of the frame + frame->releaseClient(); + delete client->frame; client->frame = 0;

@@ -610,6 +606,10 @@

// unfocus the client (calls the focus callbacks) client->unfocus(); +#ifdef DEBUG + printf("Unmanaged window 0x%lx\n", client->window()); +#endif + delete client; // update the root properties