diff options
author | Sergey Udaltsov <svu@gnome.org> | 2004-10-11 22:38:17 +0000 |
---|---|---|
committer | Sergey Udaltsov <svu@gnome.org> | 2004-10-11 22:38:17 +0000 |
commit | 943cc9ec8bb2c38c60816ef99559761fe1825b3d (patch) | |
tree | 182a116119b0b14921f143b53b7d73aa21551095 /libxklavier/xklavier_xkb.c | |
parent | 67c41646df4c7eacbf3aa02a019a9b7a01a2f326 (diff) | |
download | libxklavier-943cc9ec8bb2c38c60816ef99559761fe1825b3d.tar.gz |
Introducing the envvar XKL_DEBUG - I am sick of calling XklSetDebug manually
Diffstat (limited to 'libxklavier/xklavier_xkb.c')
-rw-r--r-- | libxklavier/xklavier_xkb.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libxklavier/xklavier_xkb.c b/libxklavier/xklavier_xkb.c index 7537fce..a92ed7d 100644 --- a/libxklavier/xklavier_xkb.c +++ b/libxklavier/xklavier_xkb.c @@ -1,4 +1,5 @@ #include <time.h> +#include <stdlib.h> #include <X11/Xatom.h> #include <X11/Xlib.h> @@ -35,6 +36,13 @@ int XklInit( Display * a_dpy ) { int opcode; int scr; + char *sdl; + + sdl = getenv( "XKL_DEBUG" ); + if( sdl != NULL ) + { + XklSetDebugLevel( atoi( sdl ) ); + } if( !a_dpy ) { @@ -89,8 +97,6 @@ int XklInit( Display * a_dpy ) _xklSecondaryGroupsMask = 0L; _xklPrevAppWindow = 0; - XkbInitAtoms( NULL ); - return _XklLoadAllInfo( )? 0 : _xklLastErrorCode; } |