diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-07 20:21:42 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-07 20:21:42 +0000 |
| commit | cc36ecf2f2ba827081669512dc304c71b2169a83 (patch) | |
| tree | 101c9ded274d84ac382d757c90ffb59fc2b878a7 /src | |
| parent | f11bd1b0cc5973590d1ee547736ac00f50447efa (diff) | |
don't reparent to root if the client has already reparented since unmapping
Diffstat (limited to 'src')
| -rw-r--r-- | src/frame.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/frame.cc b/src/frame.cc index ac631d01..3b9cb968 100644 --- a/src/frame.cc +++ b/src/frame.cc @@ -429,13 +429,18 @@ void OBFrame::grabClient() void OBFrame::releaseClient() { - // XXX: check for a reparent before reparenting? - - // according to the ICCCM - if the client doesn't reparent to - // root, then we have to do it for them - XReparentWindow(otk::OBDisplay::display, _client->window(), - _screen->rootWindow(), - _client->area().x(), _client->area().y()); + // check if the app has already reparented its window away + XEvent ev; + if (XCheckTypedWindowEvent(otk::OBDisplay::display, _client->window(), + ReparentNotify, &ev)) { + XPutBack(otk::OBDisplay::display, &ev); + } else { + // according to the ICCCM - if the client doesn't reparent itself, then we + // will reparent the window to root for them + XReparentWindow(otk::OBDisplay::display, _client->window(), + _screen->rootWindow(), + _client->area().x(), _client->area().y()); + } } |
