X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fscreen.cc;h=09f57d64ebde4200b24e0593844da1b4cded300e;hb=f11bd1b0cc5973590d1ee547736ac00f50447efa;hp=3c364b4c25827528beede789704b8ba7ae5cd943;hpb=6062fe404ce5f2505494132d5454370d696625ca;p=chaz%2Fopenbox 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;