From 203f8b1a38caa69d52a379c8d10e8b8314908448 Mon Sep 17 00:00:00 2001 From: Sergey Udaltsov Date: Tue, 8 Jun 2004 01:44:23 +0000 Subject: some improvement in the last fix - really update the current state only when LockGroup is planned --- libxklavier/xklavier_evt.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libxklavier/xklavier_evt.c b/libxklavier/xklavier_evt.c index 6369092..5fb02f5 100644 --- a/libxklavier/xklavier_evt.c +++ b/libxklavier/xklavier_evt.c @@ -245,15 +245,6 @@ void _XklFocusInEvHandler( XFocusChangeEvent * fev ) if( _xklCurClient != appWin ) { Bool transparent; - XklState tmpState; - - /** - * For fast mouse movements - the state is probably not updated yet - * (because of the group change notification being late). - * so we'll enforce the update. But this should only happen in GPA mode - */ - if( XklIsGroupPerApp() && XklGetState( _xklCurClient, &tmpState ) ) - _XklUpdateCurState( tmpState.group, tmpState.indicators ); _xklCurClient = appWin; XklDebug( 150, "CurClient:changed to " WINID_FORMAT ", '%s'\n", @@ -286,6 +277,12 @@ void _XklFocusInEvHandler( XFocusChangeEvent * fev ) XklDebug( 150, "Restoring the group from %d to %d after gaining focus\n", _xklCurState.group, selectedWindowState.group ); + /** + * For fast mouse movements - the state is probably not updated yet + * (because of the group change notification being late). + * so we'll enforce the update. But this should only happen in GPA mode + */ + _XklUpdateCurState( selectedWindowState.group, selectedWindowState.indicators ); XklLockGroup( selectedWindowState.group ); } else { -- cgit v1.2.1