consult rulebook on honoring a 0 usertime

apparently some clients (randomly?) set
_NET_WM_USER_TIME to 0 (recorded for libreoffice,
audacity and perhaps firefox), so we allow to
forcefully have them accept the focus here

CCBUG: 340915
REVIEW: 122195
This commit is contained in:
Thomas Lübking 2015-01-22 01:11:54 +01:00
parent 04724a15b6
commit 6957e1cf1a

View file

@ -556,8 +556,10 @@ bool Workspace::allowClientActivation(const KWin::Client *c, xcb_timestamp_t tim
// got FocusOut, and therefore got deactivated.
ac = last_active_client;
}
if (time == 0) // explicitly asked not to get focus
return false;
if (time == 0) { // explicitly asked not to get focus
if (!c->rules()->checkAcceptFocus(false))
return false;
}
if (level == 0) // none
return true;
if (level == 4) // extreme