Detect also X focus policy set to PointerRoot, and re-activate the active
window instead of setting focus to null focus window. CCMAIL: 81145-done@bugs.kde.org svn path=/trunk/kdebase/kwin/; revision=310051
This commit is contained in:
parent
568b06087b
commit
36a1cd4b18
1 changed files with 8 additions and 4 deletions
12
events.cpp
12
events.cpp
|
@ -426,16 +426,20 @@ bool Workspace::workspaceEvent( XEvent * e )
|
|||
return FALSE;
|
||||
break;
|
||||
case FocusIn:
|
||||
if( e->xfocus.window == rootWin() && e->xfocus.detail == NotifyDetailNone )
|
||||
if( e->xfocus.window == rootWin()
|
||||
&& ( e->xfocus.detail == NotifyDetailNone || e->xfocus.detail == NotifyPointerRoot ))
|
||||
{
|
||||
updateXTime(); // focusToNull() uses qt_x_time, which is old now (FocusIn has no timestamp)
|
||||
Window focus;
|
||||
int revert;
|
||||
XGetInputFocus( qt_xdisplay(), &focus, &revert );
|
||||
if( focus == None )
|
||||
if( focus == None || focus == PointerRoot )
|
||||
{
|
||||
kdWarning( 1212 ) << "X focus set to None, reseting focus" << endl;
|
||||
focusToNull();
|
||||
kdWarning( 1212 ) << "X focus set to None/PointerRoot, reseting focus" << endl;
|
||||
if( mostRecentlyActivatedClient() != NULL )
|
||||
requestFocus( mostRecentlyActivatedClient(), true );
|
||||
else
|
||||
focusToNull();
|
||||
}
|
||||
}
|
||||
// fall through
|
||||
|
|
Loading…
Reference in a new issue