From f11bd1b0cc5973590d1ee547736ac00f50447efa Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 7 Jan 2003 20:20:14 +0000 Subject: better reparent handling, dont fux with the event stack.. --- src/screen.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/screen.cc') 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; -- cgit v1.2.3