summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2010-05-15 10:53:09 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2010-05-17 09:12:43 -0700
commit2b030ce597efeac102761c85719865389da46d85 (patch)
treeea64000497df4611106ea6a16a619d20f7faee1f
parent5bdf3eb5226ea707cbcb1445bc439a0d4af2e87b (diff)
XQuartz: Don't trust deltaXY for middle mouse clicks.
The middle mouse clicks return erroneous values after returning from Fast User Switching. <rdar://problem/7979468> http://xquartz.macosforge.org/trac/ticket/389 Signed-off-by: Martin Otte <otte@duke.edu> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Edward Moy <emoy@apple.com> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit a911292c85f7069d2caabcb677ed716a04227526)
-rw-r--r--hw/xquartz/X11Application.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index d338b1c71..6d95f8c16 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -1039,12 +1039,15 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe
location.x += frame.origin.x;
location.y += frame.origin.y;
lastpt = location;
- } else if(isTabletEvent) {
+ } else if(isTabletEvent || [e type] == NSOtherMouseDown || [e type] == NSOtherMouseUp) {
// NSEvents for tablets are not consistent wrt deltaXY between events, so we cannot rely on that
// Thus tablets will be subject to the warp-pointer bug worked around by the delta, but tablets
// are not normally used in cases where that bug would present itself, so this is a fair tradeoff
// <rdar://problem/7111003> deltaX and deltaY are incorrect for NSMouseMoved, NSTabletPointEventSubtype
// http://xquartz.macosforge.org/trac/ticket/288
+ // The deltaXY for middle click events also appear erroneous after fast user switching
+ // <rdar://problem/7979468> deltaX and deltaY are incorrect for NSOtherMouseDown and NSOtherMouseUp after FUS
+ // http://xquartz.macosforge.org/trac/ticket/389
location = [e locationInWindow];
lastpt = location;
} else {