don't release clients reparented somewhere else
this broke re-embedding clients XReparentWindow causes an unmap of mapped clients, currently leading into releaseClient() This will (among other) eg. reparent the client to the root and this is (usually?) executed after the original XReparentWindow, so the client does not end up where it's supposed to be. REVIEW: 109484
This commit is contained in:
parent
72db0e5e71
commit
9a3a7c8824
2 changed files with 16 additions and 1 deletions
12
events.cpp
12
events.cpp
|
@ -740,7 +740,17 @@ void Client::unmapNotifyEvent(XUnmapEvent* e)
|
|||
if (ignore)
|
||||
return;
|
||||
}
|
||||
releaseWindow();
|
||||
|
||||
// check whether this is result of an XReparentWindow - client then won't be parented by wrapper
|
||||
// in this case do not release the client (causes reparent to root, removal from saveSet and what not)
|
||||
// but just destroy the client
|
||||
Xcb::Tree tree(client);
|
||||
xcb_window_t daddy = tree.parent();
|
||||
if (daddy == wrapper) {
|
||||
releaseWindow(); // unmapped from a regular client state
|
||||
} else {
|
||||
destroyClient(); // the client was moved to some other parent
|
||||
}
|
||||
}
|
||||
|
||||
void Client::destroyNotifyEvent(XDestroyWindowEvent* e)
|
||||
|
|
|
@ -179,6 +179,11 @@ public:
|
|||
inline WindowId *children() {
|
||||
return xcb_query_tree_children(data());
|
||||
}
|
||||
inline xcb_window_t parent() {
|
||||
if (isNull())
|
||||
return XCB_WINDOW_NONE;
|
||||
return (*this)->parent;
|
||||
}
|
||||
};
|
||||
|
||||
inline xcb_get_input_focus_cookie_t get_input_focus(xcb_connection_t *c, xcb_window_t) {
|
||||
|
|
Loading…
Reference in a new issue