Revert "skip double focus taking"
The commit actually introduced an windowEvent processing for new created clients and caused BUG: 290392 FIXED-IN: 4.8.1 This makes the original code a bit more straight and less confusing and effectively reverts commit ce97e4fd586ff225f2b2e8c5042baf6821bc52c0.
This commit is contained in:
parent
b2c81216a2
commit
993f4ba583
1 changed files with 14 additions and 20 deletions
34
events.cpp
34
events.cpp
|
@ -342,29 +342,23 @@ bool Workspace::workspaceEvent(XEvent * e)
|
||||||
case MapRequest: {
|
case MapRequest: {
|
||||||
updateXTime();
|
updateXTime();
|
||||||
|
|
||||||
// e->xmaprequest.window is different from e->xany.window
|
if (Client* c = findClient(WindowMatchPredicate(e->xmaprequest.window))) {
|
||||||
// TODO this shouldn't be necessary now
|
// e->xmaprequest.window is different from e->xany.window
|
||||||
Client* c = findClient(WindowMatchPredicate(e->xmaprequest.window));
|
// TODO this shouldn't be necessary now
|
||||||
if (!c) {
|
|
||||||
// don't check for the parent being the root window, this breaks when some app unmaps
|
|
||||||
// a window, changes something and immediately maps it back, without giving KWin
|
|
||||||
// a chance to reparent it back to root
|
|
||||||
// since KWin can get MapRequest only for root window children and
|
|
||||||
// children of WindowWrapper (=clients), the check is AFAIK useless anyway
|
|
||||||
// Note: Now the save-set support in Client::mapRequestEvent() actually requires that
|
|
||||||
// this code doesn't check the parent to be root.
|
|
||||||
// if ( e->xmaprequest.parent == root ) {
|
|
||||||
if (c = createClient(e->xmaprequest.window, false))
|
|
||||||
c->windowEvent(e);
|
|
||||||
else // refused to manage, simply map it (most probably override redirect)
|
|
||||||
XMapRaised(display(), e->xmaprequest.window);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
c->windowEvent(e);
|
c->windowEvent(e);
|
||||||
updateFocusChains(c, FocusChainUpdate);
|
updateFocusChains(c, FocusChainUpdate);
|
||||||
return true;
|
} else if ( true /*|| e->xmaprequest.parent != root */ ) {
|
||||||
|
// NOTICE don't check for the parent being the root window, this breaks when some app unmaps
|
||||||
|
// a window, changes something and immediately maps it back, without giving KWin
|
||||||
|
// a chance to reparent it back to root
|
||||||
|
// since KWin can get MapRequest only for root window children and
|
||||||
|
// children of WindowWrapper (=clients), the check is AFAIK useless anyway
|
||||||
|
// NOTICE: The save-set support in Client::mapRequestEvent() actually requires that
|
||||||
|
// this code doesn't check the parent to be root.
|
||||||
|
if (!createClient(e->xmaprequest.window, false))
|
||||||
|
XMapRaised(display(), e->xmaprequest.window);
|
||||||
}
|
}
|
||||||
break;
|
return true;
|
||||||
}
|
}
|
||||||
case MapNotify: {
|
case MapNotify: {
|
||||||
if (e->xmap.override_redirect) {
|
if (e->xmap.override_redirect) {
|
||||||
|
|
Loading…
Reference in a new issue