~ubuntu-branches/ubuntu/oneiric/gnome-settings-daemon/oneiric

« back to all changes in this revision

Viewing changes to plugins/common/gsd-keygrab.c

  • Committer: Package Import Robot
  • Author(s): Rodrigo Moya
  • Date: 2011-09-19 17:05:48 UTC
  • mto: This revision was merged to the branch mainline in revision 169.
  • Revision ID: package-import@ubuntu.com-20110919170548-4d8k2g7jrqp7rbe0
Tags: upstream-3.1.92
ImportĀ upstreamĀ versionĀ 3.1.92

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
#include <gdk/gdk.h>
26
26
#include <gdk/gdkx.h>
27
 
#ifdef HAVE_X11_EXTENSIONS_XKB_H
28
27
#include <X11/XKBlib.h>
29
28
#include <X11/extensions/XKB.h>
30
29
#include <gdk/gdkkeysyms.h>
31
 
#endif
32
30
 
33
31
#include "eggaccelerators.h"
34
32
 
211
209
        static int have_xkb = -1;
212
210
 
213
211
        if (have_xkb == -1) {
214
 
#ifdef HAVE_X11_EXTENSIONS_XKB_H
215
212
                int opcode, error_base, major, minor, xkb_event_base;
216
213
 
217
214
                have_xkb = XkbQueryExtension (dpy,
221
218
                                              &major,
222
219
                                              &minor)
223
220
                        && XkbUseExtension (dpy, &major, &minor);
224
 
#else
225
 
                have_xkb = 0;
226
 
#endif
227
221
        }
228
222
 
229
223
        return have_xkb;
255
249
 
256
250
        setup_modifiers ();
257
251
 
258
 
#ifdef HAVE_X11_EXTENSIONS_XKB_H
259
252
        if (have_xkb (event->xkey.display))
260
253
                group = XkbGroupForCoreState (event->xkey.state);
261
254
        else
262
 
#endif
263
255
                group = (event->xkey.state & GDK_KEY_Mode_switch) ? 1 : 0;
264
256
 
265
257
        /* Check if we find a keysym that matches our current state */