aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi/mieq.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-23 10:01:52 +0100
committermarha <marha@users.sourceforge.net>2011-12-23 10:01:52 +0100
commite22891346b85a7db40dec7260a100f90b451cbc8 (patch)
treea7dd2d6757253947bcc821abbf68fd24d3301e89 /xorg-server/mi/mieq.c
parentabacebe06d9f3d2fe1b7d256bd86cddbfa592a85 (diff)
downloadvcxsrv-e22891346b85a7db40dec7260a100f90b451cbc8.tar.gz
vcxsrv-e22891346b85a7db40dec7260a100f90b451cbc8.tar.bz2
vcxsrv-e22891346b85a7db40dec7260a100f90b451cbc8.zip
git mesa pixman xserver xkeyboard-config update 24 dec 2011
Diffstat (limited to 'xorg-server/mi/mieq.c')
-rw-r--r--xorg-server/mi/mieq.c37
1 files changed, 30 insertions, 7 deletions
diff --git a/xorg-server/mi/mieq.c b/xorg-server/mi/mieq.c
index 093dba20f..6c46eb9fe 100644
--- a/xorg-server/mi/mieq.c
+++ b/xorg-server/mi/mieq.c
@@ -370,8 +370,14 @@ ChangeDeviceID(DeviceIntPtr dev, InternalEvent* event)
case ET_ProximityOut:
case ET_Hierarchy:
case ET_DeviceChanged:
+ case ET_TouchBegin:
+ case ET_TouchUpdate:
+ case ET_TouchEnd:
event->device_event.deviceid = dev->id;
break;
+ case ET_TouchOwnership:
+ event->touch_ownership_event.deviceid = dev->id;
+ break;
#if XFreeXDGA
case ET_DGAEvent:
break;
@@ -381,6 +387,9 @@ ChangeDeviceID(DeviceIntPtr dev, InternalEvent* event)
case ET_RawButtonPress:
case ET_RawButtonRelease:
case ET_RawMotion:
+ case ET_RawTouchBegin:
+ case ET_RawTouchEnd:
+ case ET_RawTouchUpdate:
event->raw_event.deviceid = dev->id;
break;
default:
@@ -462,6 +471,19 @@ CopyGetMasterEvent(DeviceIntPtr sdev,
}
+static void
+mieqMoveToNewScreen(DeviceIntPtr dev, ScreenPtr screen, DeviceEvent *event)
+{
+ if (dev && screen && screen != DequeueScreen(dev))
+ {
+ int x = 0, y = 0;
+ DequeueScreen(dev) = screen;
+ x = event->root_x;
+ y = event->root_y;
+ NewCurrentScreen (dev, DequeueScreen(dev), x, y);
+ }
+}
+
/**
* Post the given @event through the device hierarchy, as appropriate.
* Use this function if an event must be posted for a given device during the
@@ -473,7 +495,6 @@ mieqProcessDeviceEvent(DeviceIntPtr dev,
ScreenPtr screen)
{
mieqHandler handler;
- int x = 0, y = 0;
DeviceIntPtr master;
InternalEvent mevent; /* master event */
@@ -490,12 +511,14 @@ mieqProcessDeviceEvent(DeviceIntPtr dev,
case ET_KeyRelease:
case ET_ButtonPress:
case ET_ButtonRelease:
- if (dev && screen && screen != DequeueScreen(dev) && !handler) {
- DequeueScreen(dev) = screen;
- x = event->device_event.root_x;
- y = event->device_event.root_y;
- NewCurrentScreen (dev, DequeueScreen(dev), x, y);
- }
+ if (!handler)
+ mieqMoveToNewScreen(dev, screen, &event->device_event);
+ break;
+ case ET_TouchBegin:
+ case ET_TouchUpdate:
+ case ET_TouchEnd:
+ if (!handler && (event->device_event.flags & TOUCH_POINTER_EMULATED))
+ mieqMoveToNewScreen(dev, screen, &event->device_event);
break;
default:
break;