gdm/gdm-2.21.9-check-capslock-state-not-capslock-light-state.patch
Ray Strode 651c1a1984 - Update to snapshot
- Split user-switcher out
2008-02-29 22:04:23 +00:00

26 lines
836 B
Diff

Index: gui/simple-greeter/gdm-greeter-login-window.c
===================================================================
--- gdm-2.21.9/gui/simple-greeter/gdm-greeter-login-window.c (revision 5897)
+++ gdm-2.21.9/gui/simple-greeter/gdm-greeter-login-window.c (working copy)
@@ -178,16 +178,16 @@ capslock_update (GdmGreeterLoginWindow *
static gboolean
is_capslock_on (void)
{
- unsigned int states;
+ XkbStateRec states;
Display *dsp;
dsp = GDK_DISPLAY ();
- if (XkbGetIndicatorState (dsp, XkbUseCoreKbd, &states) != Success) {
- return FALSE;
+ if (XkbGetState (dsp, XkbUseCoreKbd, &states) != Success) {
+ return FALSE;
}
- return (states & ShiftMask) != 0;
+ return (states.locked_mods & LockMask) != 0;
}
static void