aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/X11Application.m
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-18 11:42:34 +0000
committermarha <marha@users.sourceforge.net>2010-05-18 11:42:34 +0000
commita457b80612b4f37be47099e9a0f38c4fc2a42252 (patch)
treec997f59413969bf8dde22001100abd9399685612 /xorg-server/hw/xquartz/X11Application.m
parentb103ec11e433e85764d9b82eed17b9284056d164 (diff)
downloadvcxsrv-a457b80612b4f37be47099e9a0f38c4fc2a42252.tar.gz
vcxsrv-a457b80612b4f37be47099e9a0f38c4fc2a42252.tar.bz2
vcxsrv-a457b80612b4f37be47099e9a0f38c4fc2a42252.zip
xserver git update 18/10/2010
Diffstat (limited to 'xorg-server/hw/xquartz/X11Application.m')
-rw-r--r--xorg-server/hw/xquartz/X11Application.m28
1 files changed, 20 insertions, 8 deletions
diff --git a/xorg-server/hw/xquartz/X11Application.m b/xorg-server/hw/xquartz/X11Application.m
index c9a0d669f..805ed9933 100644
--- a/xorg-server/hw/xquartz/X11Application.m
+++ b/xorg-server/hw/xquartz/X11Application.m
@@ -1030,20 +1030,32 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe
if(isMouseOrTabletEvent) {
static NSPoint lastpt;
NSWindow *window = [e window];
- NSRect screen = [[[NSScreen screens] objectAtIndex:0] frame];;
-
+ NSRect screen = [[[NSScreen screens] objectAtIndex:0] frame];
+ BOOL hasUntrustedPointerDelta;
+
+ // 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
+ hasUntrustedPointerDelta = isTabletEvent;
+
+ // 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
+ hasUntrustedPointerDelta = hasUntrustedPointerDelta || [e type] == NSOtherMouseDown || [e type] == NSOtherMouseUp;
+
+ // The deltaXY for scroll events correspond to the scroll delta, not the pointer delta
+ // <rdar://problem/7989690> deltaXY for wheel events are being sent as mouse movement
+ hasUntrustedPointerDelta = hasUntrustedPointerDelta || [e type] == NSScrollWheel;
+
if (window != nil) {
NSRect frame = [window frame];
location = [e locationInWindow];
location.x += frame.origin.x;
location.y += frame.origin.y;
lastpt = location;
- } else if(isTabletEvent) {
- // 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
+ } else if(hasUntrustedPointerDelta) {
location = [e locationInWindow];
lastpt = location;
} else {