gnome-screensaver r1477 - in trunk: . src



Author: mccann
Date: Sat Aug  9 01:42:02 2008
New Revision: 1477
URL: http://svn.gnome.org/viewvc/gnome-screensaver?rev=1477&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:
   trunk/ChangeLog
   trunk/src/gs-lock-plug.c

Modified: trunk/src/gs-lock-plug.c
==============================================================================
--- trunk/src/gs-lock-plug.c	(original)
+++ trunk/src/gs-lock-plug.c	Sat Aug  9 01:42:02 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]