diff options
author | Sergey Udaltsov <svu@gnome.org> | 2004-06-13 12:26:28 +0000 |
---|---|---|
committer | Sergey Udaltsov <svu@gnome.org> | 2004-06-13 12:26:28 +0000 |
commit | fac56033f0321f1e6e27c2f08fcc364993134e85 (patch) | |
tree | 5f250f0062ef1ee714ef8d0d66066c282f861bee | |
parent | 203f8b1a38caa69d52a379c8d10e8b8314908448 (diff) | |
download | libxklavier-fac56033f0321f1e6e27c2f08fcc364993134e85.tar.gz |
a bit improved debugging
-rw-r--r-- | libxklavier/xklavier_evt.c | 10 | ||||
-rw-r--r-- | libxklavier/xklavier_private.h | 2 | ||||
-rw-r--r-- | libxklavier/xklavier_util.c | 5 |
3 files changed, 11 insertions, 6 deletions
diff --git a/libxklavier/xklavier_evt.c b/libxklavier/xklavier_evt.c index 5fb02f5..96441db 100644 --- a/libxklavier/xklavier_evt.c +++ b/libxklavier/xklavier_evt.c @@ -97,7 +97,8 @@ void _XklStdXkbHandler( int grp, XklStateChange changeType, unsigned inds, if( focusedApp != _xklCurClient ) { - _XklUpdateCurState( grp, inds ); + _XklUpdateCurState( grp, inds, + "Updating the state from new focused window" ); _XklAddAppWindow( focusedApp, ( Window ) NULL, False, &_xklCurState ); _xklCurClient = focusedApp; @@ -111,7 +112,8 @@ void _XklStdXkbHandler( int grp, XklStateChange changeType, unsigned inds, if( setGroup || haveState ) { _XklUpdateCurState( setGroup ? grp : oldState.group, - setInds ? inds : oldState.indicators ); + setInds ? inds : oldState.indicators, + "Restoring the state from the window" ); } if( haveState ) @@ -282,7 +284,9 @@ void _XklFocusInEvHandler( XFocusChangeEvent * fev ) * (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 ); + _XklUpdateCurState( selectedWindowState.group, + selectedWindowState.indicators, + "Enforcing fast update of the current state" ); XklLockGroup( selectedWindowState.group ); } else { diff --git a/libxklavier/xklavier_private.h b/libxklavier/xklavier_private.h index 260cf48..dc5e567 100644 --- a/libxklavier/xklavier_private.h +++ b/libxklavier/xklavier_private.h @@ -77,7 +77,7 @@ extern const char *_XklGetEventName( int type ); extern Bool _XklIsTransparentAppWindow( Window appWin ); -extern void _XklUpdateCurState( int group, unsigned indicators ); +extern void _XklUpdateCurState( int group, unsigned indicators, const char reason[] ); extern Display *_xklDpy; diff --git a/libxklavier/xklavier_util.c b/libxklavier/xklavier_util.c index 7385fec..6a9dad8 100644 --- a/libxklavier/xklavier_util.c +++ b/libxklavier/xklavier_util.c @@ -257,10 +257,11 @@ const char *_XklGetEventName( int type ) return evtNames[type]; } -void _XklUpdateCurState( int group, unsigned indicators ) +void _XklUpdateCurState( int group, unsigned indicators, const char reason[] ) { XklDebug( 150, - "Updating the current state with [%d:%u]\n", group, indicators ); + "Updating the current state with [%d:%u], reason: %s\n", + group, indicators, reason ); _xklCurState.group = group; _xklCurState.indicators = indicators; } |