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=290622icc-effect-5.14.5
parent
339c7a297f
commit
53eefc6ed3
12
events.cpp
12
events.cpp
|
@ -406,9 +406,15 @@ bool Workspace::workspaceEvent( XEvent * e )
|
||||||
case FocusIn:
|
case FocusIn:
|
||||||
if( e->xfocus.window == rootWin() && e->xfocus.detail == NotifyDetailNone )
|
if( e->xfocus.window == rootWin() && e->xfocus.detail == NotifyDetailNone )
|
||||||
{
|
{
|
||||||
kdWarning( 1212 ) << "X focus set to None, reseting focus" << endl;
|
updateXTime(); // focusToNull() uses qt_x_time, which is old now (FocusIn has no timestamp)
|
||||||
XSetInputFocus(qt_xdisplay(), null_focus_window, RevertToPointerRoot, CurrentTime );
|
Window focus;
|
||||||
// focusToNull() uses qt_x_time, which is old now (FocusIn has no timestamp)
|
int revert;
|
||||||
|
XGetInputFocus( qt_xdisplay(), &focus, &revert );
|
||||||
|
if( focus == None )
|
||||||
|
{
|
||||||
|
kdWarning( 1212 ) << "X focus set to None, reseting focus" << endl;
|
||||||
|
focusToNull();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// fall through
|
// fall through
|
||||||
case FocusOut:
|
case FocusOut:
|
||||||
|
|
Loading…
Reference in New Issue