Before getting event about focus being set to None, really check if it's
still so before reseting it. Fixes problem with kview run from konsole, set to fullscreen, set back to normal, closed -> konsole doesn't become active. svn path=/trunk/kdebase/kwin/; revision=290622
This commit is contained in:
parent
339c7a297f
commit
53eefc6ed3
1 changed files with 9 additions and 3 deletions
12
events.cpp
12
events.cpp
|
@ -406,9 +406,15 @@ bool Workspace::workspaceEvent( XEvent * e )
|
|||
case FocusIn:
|
||||
if( e->xfocus.window == rootWin() && e->xfocus.detail == NotifyDetailNone )
|
||||
{
|
||||
kdWarning( 1212 ) << "X focus set to None, reseting focus" << endl;
|
||||
XSetInputFocus(qt_xdisplay(), null_focus_window, RevertToPointerRoot, CurrentTime );
|
||||
// focusToNull() uses qt_x_time, which is old now (FocusIn has no timestamp)
|
||||
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 )
|
||||
{
|
||||
kdWarning( 1212 ) << "X focus set to None, reseting focus" << endl;
|
||||
focusToNull();
|
||||
}
|
||||
}
|
||||
// fall through
|
||||
case FocusOut:
|
||||
|
|
Loading…
Reference in a new issue