]> Pileus Git - ~andy/gtk/commitdiff
If both Shift and CapsLock pressed, ignore the shift only for letters
authorTor Lillqvist <tml@iki.fi>
Sat, 10 Apr 2004 08:43:36 +0000 (08:43 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Sat, 10 Apr 2004 08:43:36 +0000 (08:43 +0000)
2004-04-10  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkkeys-win32.c (gdk_keymap_translate_keyboard_state):
If both Shift and CapsLock pressed, ignore the shift only for
letters (that would have been affected by the CapsLock). (#139095)

* gdk/win32/gdkglobals-win32.c: Disable tablet support by default,
seems to be even buggier now than it used to be. (#138341)
Initialize _gdk_input_ignore_wintab to TRUE.

* gdk/win32/gdkmain-win32.c: Add --use-wintab switch and
GDK_USE_WINTAB environment variable to turn on tablet support.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/win32/gdkglobals-win32.c
gdk/win32/gdkkeys-win32.c
gdk/win32/gdkmain-win32.c

index 7e7b432985a6d104381ccf2e6c8fe541755e9381..4dfc829c1120979c97b1bcc3a4c949877c3c1738 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2004-04-10  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkkeys-win32.c (gdk_keymap_translate_keyboard_state):
+       If both Shift and CapsLock pressed, ignore the shift only for
+       letters (that would have been affected by the CapsLock). (#139095)
+
+       * gdk/win32/gdkglobals-win32.c: Disable tablet support by default,
+       seems to be even buggier now than it used to be. (#138341)
+       Initialize _gdk_input_ignore_wintab to TRUE.
+
+       * gdk/win32/gdkmain-win32.c: Add --use-wintab switch and
+       GDK_USE_WINTAB environment variable to turn on tablet support.
+
 2004-04-09  Christian Persch  <chpe@cvs.gnome.org>
 
        * gtk/gtkuimanager.c: (gtk_ui_manager_insert_action_group),
index 7e7b432985a6d104381ccf2e6c8fe541755e9381..4dfc829c1120979c97b1bcc3a4c949877c3c1738 100644 (file)
@@ -1,3 +1,16 @@
+2004-04-10  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkkeys-win32.c (gdk_keymap_translate_keyboard_state):
+       If both Shift and CapsLock pressed, ignore the shift only for
+       letters (that would have been affected by the CapsLock). (#139095)
+
+       * gdk/win32/gdkglobals-win32.c: Disable tablet support by default,
+       seems to be even buggier now than it used to be. (#138341)
+       Initialize _gdk_input_ignore_wintab to TRUE.
+
+       * gdk/win32/gdkmain-win32.c: Add --use-wintab switch and
+       GDK_USE_WINTAB environment variable to turn on tablet support.
+
 2004-04-09  Christian Persch  <chpe@cvs.gnome.org>
 
        * gtk/gtkuimanager.c: (gtk_ui_manager_insert_action_group),
index 7e7b432985a6d104381ccf2e6c8fe541755e9381..4dfc829c1120979c97b1bcc3a4c949877c3c1738 100644 (file)
@@ -1,3 +1,16 @@
+2004-04-10  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkkeys-win32.c (gdk_keymap_translate_keyboard_state):
+       If both Shift and CapsLock pressed, ignore the shift only for
+       letters (that would have been affected by the CapsLock). (#139095)
+
+       * gdk/win32/gdkglobals-win32.c: Disable tablet support by default,
+       seems to be even buggier now than it used to be. (#138341)
+       Initialize _gdk_input_ignore_wintab to TRUE.
+
+       * gdk/win32/gdkmain-win32.c: Add --use-wintab switch and
+       GDK_USE_WINTAB environment variable to turn on tablet support.
+
 2004-04-09  Christian Persch  <chpe@cvs.gnome.org>
 
        * gtk/gtkuimanager.c: (gtk_ui_manager_insert_action_group),
index 7e7b432985a6d104381ccf2e6c8fe541755e9381..4dfc829c1120979c97b1bcc3a4c949877c3c1738 100644 (file)
@@ -1,3 +1,16 @@
+2004-04-10  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkkeys-win32.c (gdk_keymap_translate_keyboard_state):
+       If both Shift and CapsLock pressed, ignore the shift only for
+       letters (that would have been affected by the CapsLock). (#139095)
+
+       * gdk/win32/gdkglobals-win32.c: Disable tablet support by default,
+       seems to be even buggier now than it used to be. (#138341)
+       Initialize _gdk_input_ignore_wintab to TRUE.
+
+       * gdk/win32/gdkmain-win32.c: Add --use-wintab switch and
+       GDK_USE_WINTAB environment variable to turn on tablet support.
+
 2004-04-09  Christian Persch  <chpe@cvs.gnome.org>
 
        * gtk/gtkuimanager.c: (gtk_ui_manager_insert_action_group),
index 7e7b432985a6d104381ccf2e6c8fe541755e9381..4dfc829c1120979c97b1bcc3a4c949877c3c1738 100644 (file)
@@ -1,3 +1,16 @@
+2004-04-10  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkkeys-win32.c (gdk_keymap_translate_keyboard_state):
+       If both Shift and CapsLock pressed, ignore the shift only for
+       letters (that would have been affected by the CapsLock). (#139095)
+
+       * gdk/win32/gdkglobals-win32.c: Disable tablet support by default,
+       seems to be even buggier now than it used to be. (#138341)
+       Initialize _gdk_input_ignore_wintab to TRUE.
+
+       * gdk/win32/gdkmain-win32.c: Add --use-wintab switch and
+       GDK_USE_WINTAB environment variable to turn on tablet support.
+
 2004-04-09  Christian Persch  <chpe@cvs.gnome.org>
 
        * gtk/gtkuimanager.c: (gtk_ui_manager_insert_action_group),
index 3215877286a8f8bcc0dc5c57b3e4b6689d41b2a1..831c05acc6bb0208ec421cef34246d806d5ff160 100644 (file)
@@ -64,5 +64,5 @@ GdkAtom                 _wm_transient_for;
 
 DWORD            _windows_version;
 
-gint             _gdk_input_ignore_wintab = FALSE;
+gint             _gdk_input_ignore_wintab = TRUE;
 gint             _gdk_max_colors = 0;
index 1756ef256f2aaee1a5b4dffd5019440585a4ac05..9473a36acc54e1bc9e3885e2b491c21d1b320891 100644 (file)
@@ -667,17 +667,20 @@ gdk_keymap_translate_keyboard_state (GdkKeymap       *keymap,
   if (group < 0 || group >= 2)
     return FALSE;
 
-  if ((state & GDK_SHIFT_MASK) && (state & GDK_LOCK_MASK))
-    shift_level = 0;           /* shift disables caps lock */
+  update_keymap ();
+
+  keyvals = keysym_tab + hardware_keycode*4;
+
+  if ((state & GDK_SHIFT_MASK) &&
+      (state & GDK_LOCK_MASK) &&
+      keyvals[group*2 + 1] == gdk_keyval_to_upper (keyvals[group*2 + 0]))
+    /* Shift disables caps lock */
+    shift_level = 0;           
   else if (state & GDK_SHIFT_MASK)
     shift_level = 1;
   else
     shift_level = 0;
 
-  update_keymap ();
-
-  keyvals = keysym_tab + hardware_keycode*4;
-
   /* Drop group and shift if there are no keysymbols on
    * the key for those.
    */
index a8aa92ce6f180b27bdfdabe76e939c7440889feb..df42789e23f042cfd3d86b070af87012161dc185 100644 (file)
@@ -58,6 +58,8 @@ GdkArgDesc _gdk_windowing_args[] = {
                                                     (GdkArgFunc) NULL},
   { "ignore-wintab", GDK_ARG_BOOL, &_gdk_input_ignore_wintab,
                                                     (GdkArgFunc) NULL},
+  { "use-wintab",    GDK_ARG_NOBOOL, &_gdk_input_ignore_wintab,
+                                                    (GdkArgFunc) NULL},
   { "max-colors",    GDK_ARG_INT,  &_gdk_max_colors,  (GdkArgFunc) NULL},
   { NULL }
 };
@@ -81,6 +83,8 @@ _gdk_windowing_init (gint    *argc,
 #ifdef HAVE_WINTAB
   if (getenv ("GDK_IGNORE_WINTAB") != NULL)
     _gdk_input_ignore_wintab = TRUE;
+  else if (getenv ("GDK_USE_WINTAB") != NULL)
+    _gdk_input_ignore_wintab = FALSE;
 #endif
 
   if (gdk_synchronize)