gtk+ r20054 - in trunk: . gdk/quartz



Author: rhult
Date: Wed Apr 30 17:42:27 2008
New Revision: 20054
URL: http://svn.gnome.org/viewvc/gtk+?rev=20054&view=rev

Log:
2008-04-30  Richard Hult  <richard imendio com>

	* gdk/quartz/gdkevents-quartz.c:
	(get_keyboard_modifiers_from_ns_event), (create_key_event): Map
	Alt to Alt and Cmd to Meta. This is not only more logical but also
	makes it easier to have Mac-like behavior.


Modified:
   trunk/ChangeLog
   trunk/gdk/quartz/gdkevents-quartz.c

Modified: trunk/gdk/quartz/gdkevents-quartz.c
==============================================================================
--- trunk/gdk/quartz/gdkevents-quartz.c	(original)
+++ trunk/gdk/quartz/gdkevents-quartz.c	Wed Apr 30 17:42:27 2008
@@ -480,6 +480,8 @@
   if (nsflags & NSControlKeyMask)
     modifiers |= GDK_CONTROL_MASK;
   if (nsflags & NSCommandKeyMask)
+    modifiers |= GDK_META_MASK;
+  if (nsflags & NSAlternateKeyMask)
     modifiers |= GDK_MOD1_MASK;
 
   return modifiers;
@@ -1585,7 +1587,7 @@
         {
         case GDK_Meta_R:
         case GDK_Meta_L:
-          mask = GDK_MOD1_MASK;
+          mask = GDK_META_MASK;
           break;
         case GDK_Shift_R:
         case GDK_Shift_L:
@@ -1596,7 +1598,7 @@
           break;
         case GDK_Alt_R:
         case GDK_Alt_L:
-          mask = GDK_MOD5_MASK;
+          mask = GDK_MOD1_MASK;
           break;
         case GDK_Control_R:
         case GDK_Control_L:
@@ -2032,4 +2034,3 @@
 
   return FALSE;
 }
-



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