gnome-screensaver r1478 - in branches/gnome-2-22: . src



Author: mccann
Date: Sat Aug  9 01:46:08 2008
New Revision: 1478
URL: http://svn.gnome.org/viewvc/gnome-screensaver?rev=1478&view=rev

Log:
2008-08-08  William Jon McCann  <jmccann redhat com>

	* src/gs-lock-plug.c (is_capslock_on):
	Check for the caps lock key and not the
	indicator.
	Fixes #547013.



Modified:
   branches/gnome-2-22/ChangeLog
   branches/gnome-2-22/src/gs-lock-plug.c

Modified: branches/gnome-2-22/src/gs-lock-plug.c
==============================================================================
--- branches/gnome-2-22/src/gs-lock-plug.c	(original)
+++ branches/gnome-2-22/src/gs-lock-plug.c	Sat Aug  9 01:46:08 2008
@@ -303,20 +303,18 @@
         }
 }
 
-/* adapted from GDM2 */
 static gboolean
 is_capslock_on (void)
 {
-        unsigned int states;
-        Display     *dsp;
+        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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]