]> code.delx.au - gnu-emacs/commitdiff
macterm.c (mac_get_emulated_btn)
authorSteven Tamm <steventamm@mac.com>
Tue, 29 Jun 2004 06:23:08 +0000 (06:23 +0000)
committerSteven Tamm <steventamm@mac.com>
Tue, 29 Jun 2004 06:23:08 +0000 (06:23 +0000)
(mac_event_to_emacs_modifiers): Fix emulated mouse button
support to correctly mask out modifiers.

src/ChangeLog
src/macterm.c

index 7de0eb69cd3ad595ce27ec18344d99c0799258b9..09e9bdc49d5d0dbcbcebf3f81591e4e780d8b40f 100644 (file)
@@ -1,9 +1,15 @@
+2004-06-29  Steven Tamm  <steventamm@mac.com>
+
+       * macterm.c (mac_get_emulated_btn)
+       (mac_event_to_emacs_modifiers): Fix emulated mouse button
+       support to correctly mask out modifiers.
+
 2004-06-29  David Kastrup  <dak@gnu.org>
 
        * search.c (Fset_match_data): Allow buffer before end of list
        which can happen if set-match-data is using a pre-consed list.
 
-2004-06-28  Steven Tamm  <tamm@Steven-Tamms-Computer.local>
+2004-06-28  Steven Tamm  <steventamm@mac.com>
 
        * macterm.c (XTread_socket): Correctly set the frame position
        after the window is moved.
index bef37addaa69d29bc421a72693c8232b64a6db39..b9584be50bc7290d92c951c811542bdb053bdb97 100644 (file)
@@ -7018,7 +7018,7 @@ mac_get_emulated_btn ( UInt32 modifiers )
   int result = 0;
   if (!NILP (Vmac_emulate_three_button_mouse)) {
     int cmdIs3 = !EQ (Vmac_emulate_three_button_mouse, Qreverse);
-    if (modifiers & controlKey)
+    if (modifiers & cmdKey)
       result = cmdIs3 ? 2 : 1;
     else if (modifiers & optionKey)
       result = cmdIs3 ? 1 : 2;
@@ -7038,7 +7038,7 @@ mac_event_to_emacs_modifiers (EventRef eventRef)
   if (!NILP (Vmac_emulate_three_button_mouse) &&
       GetEventClass(eventRef) == kEventClassMouse)
     {
-      mods &= ~(optionKey & cmdKey);
+      mods &= ~(optionKey | cmdKey);
     }
   return mac_to_emacs_modifiers (mods);
 }