From: Steven Tamm Date: Tue, 29 Jun 2004 06:23:08 +0000 (+0000) Subject: macterm.c (mac_get_emulated_btn) X-Git-Tag: ttn-vms-21-2-B4~5607 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c61278bbde089da22d4a774fe348536c172c20da;p=emacs.git macterm.c (mac_get_emulated_btn) (mac_event_to_emacs_modifiers): Fix emulated mouse button support to correctly mask out modifiers. --- diff --git a/src/ChangeLog b/src/ChangeLog index 7de0eb69cd3..09e9bdc49d5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,9 +1,15 @@ +2004-06-29 Steven Tamm + + * 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 * 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 +2004-06-28 Steven Tamm * macterm.c (XTread_socket): Correctly set the frame position after the window is moved. diff --git a/src/macterm.c b/src/macterm.c index bef37addaa6..b9584be50bc 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -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); }