diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-07 20:20:14 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-07 20:20:14 +0000 |
| commit | f11bd1b0cc5973590d1ee547736ac00f50447efa (patch) | |
| tree | ea716d2589aba0573c9d10756bd5c75ec02c3c73 /src/screen.cc | |
| parent | 2ae5aaca65b4d9c9747fe787c920a547e7ec13c0 (diff) | |
better reparent handling, dont fux with the event stack..
Diffstat (limited to 'src/screen.cc')
| -rw-r--r-- | src/screen.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/screen.cc b/src/screen.cc index 3c364b4c..09f57d64 100644 --- a/src/screen.cc +++ b/src/screen.cc @@ -519,6 +519,9 @@ void OBScreen::manageWindow(Window window) Openbox::instance->addClient(client->frame->grip_left(), client); Openbox::instance->addClient(client->frame->grip_right(), client); + // reparent the client to the frame + client->frame->grabClient(); + // if on the current desktop.. (or all desktops) if (client->desktop() == _desktop || client->desktop() == (signed)0xffffffff) { @@ -548,7 +551,7 @@ void OBScreen::manageWindow(Window window) } -void OBScreen::unmanageWindow(OBClient *client) +void OBScreen::unmanageWindow(OBClient *client, bool reparented) { OBFrame *frame = client->frame; @@ -587,6 +590,14 @@ void OBScreen::unmanageWindow(OBClient *client) // 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()); + delete client->frame; client->frame = 0; |
