add some comments
clean up the releasing of the client from the frame
This commit is contained in:
parent
7e41036491
commit
3489627803
1 changed files with 10 additions and 10 deletions
|
@ -284,7 +284,6 @@ void OBScreen::changeSupportedAtoms()
|
||||||
_supportwindow = XCreateSimpleWindow(otk::OBDisplay::display,
|
_supportwindow = XCreateSimpleWindow(otk::OBDisplay::display,
|
||||||
_info->rootWindow(),
|
_info->rootWindow(),
|
||||||
0, 0, 1, 1, 0, 0, 0);
|
0, 0, 1, 1, 0, 0, 0);
|
||||||
assert(_supportwindow != None);
|
|
||||||
|
|
||||||
// set supporting window
|
// set supporting window
|
||||||
Openbox::instance->property()->set(_info->rootWindow(),
|
Openbox::instance->property()->set(_info->rootWindow(),
|
||||||
|
@ -547,11 +546,13 @@ void OBScreen::manageWindow(Window window)
|
||||||
Openbox::instance->bindings()->fireEvent(data);
|
Openbox::instance->bindings()->fireEvent(data);
|
||||||
Py_DECREF((PyObject*)data);
|
Py_DECREF((PyObject*)data);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
printf("Managed window 0x%lx\n", window);
|
printf("Managed window 0x%lx\n", window);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void OBScreen::unmanageWindow(OBClient *client, bool reparented)
|
void OBScreen::unmanageWindow(OBClient *client)
|
||||||
{
|
{
|
||||||
OBFrame *frame = client->frame;
|
OBFrame *frame = client->frame;
|
||||||
|
|
||||||
|
@ -590,13 +591,8 @@ void OBScreen::unmanageWindow(OBClient *client, bool reparented)
|
||||||
// give the client its border back
|
// give the client its border back
|
||||||
client->toggleClientBorder(true);
|
client->toggleClientBorder(true);
|
||||||
|
|
||||||
if (!reparented)
|
// reparent the window out of the frame
|
||||||
// reparent the window out of the frame
|
frame->releaseClient();
|
||||||
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());
|
|
||||||
|
|
||||||
delete client->frame;
|
delete client->frame;
|
||||||
client->frame = 0;
|
client->frame = 0;
|
||||||
|
@ -610,6 +606,10 @@ void OBScreen::unmanageWindow(OBClient *client, bool reparented)
|
||||||
// unfocus the client (calls the focus callbacks)
|
// unfocus the client (calls the focus callbacks)
|
||||||
client->unfocus();
|
client->unfocus();
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("Unmanaged window 0x%lx\n", client->window());
|
||||||
|
#endif
|
||||||
|
|
||||||
delete client;
|
delete client;
|
||||||
|
|
||||||
// update the root properties
|
// update the root properties
|
||||||
|
|
Loading…
Reference in a new issue