summaryrefslogtreecommitdiff
path: root/hw/xquartz/X11Application.m
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-09-29 22:26:20 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-10-03 11:13:03 -0700
commitaae878b89081ffba16386e8d4987469313049bea (patch)
tree41a3ef58c0aab0aa81a23edac02e99e110506de6 /hw/xquartz/X11Application.m
parentb7ad86ff8a9115147c0cf02af9e80ec464129392 (diff)
XQuartz: Actually send the pointer event from the pen even if it happes to actually have 0 pressure and 0 tilt.
(cherry picked from commit f41583761955cb9c92c43239bfaa8ae0e5d95e33)
Diffstat (limited to 'hw/xquartz/X11Application.m')
-rw-r--r--hw/xquartz/X11Application.m12
1 files changed, 9 insertions, 3 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 0436db8f9..6ca697583 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -894,6 +894,7 @@ static void send_nsevent(NSEvent *e) {
NSWindow *window;
int pointer_x, pointer_y, ev_button, ev_type;
float pressure, tilt_x, tilt_y;
+ DeviceIntPtr pDev;
/* convert location to be relative to top-left of primary display */
location = [e locationInWindow];
@@ -935,10 +936,13 @@ static void send_nsevent(NSEvent *e) {
case NSTabletPoint: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
handle_mouse:
+ pDev = darwinPointer;
if ([e type] == NSTabletPoint || [e subtype] == NSTabletPointEventSubtype) {
pressure = [e pressure];
tilt_x = [e tilt].x;
- tilt_y = [e tilt].y;
+ tilt_y = [e tilt].y;
+
+ pDev = darwinTabletCurrent;
}
if([e subtype] == NSTabletProximityEventSubtype) {
@@ -958,9 +962,11 @@ static void send_nsevent(NSEvent *e) {
DarwinSendProximityEvents([e isEnteringProximity]?ProximityIn:ProximityOut,
pointer_x, pointer_y);
+
+ pDev = darwinTabletCurrent;
}
-
- DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y,
+
+ DarwinSendPointerEvents(pDev, ev_type, ev_button, pointer_x, pointer_y,
pressure, tilt_x, tilt_y);
break;