diff options
author | marha <marha@users.sourceforge.net> | 2011-12-23 11:12:22 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-12-23 11:12:22 +0100 |
commit | 6f6a4d4a600eabf5d6a624eb5b0e98ee67afb52d (patch) | |
tree | 8dc28411ab42ebb9183bc090c10024a39fc669d6 /xorg-server/mi | |
parent | 22891980a76b862bfcda406521b454f072090fb8 (diff) | |
parent | e22891346b85a7db40dec7260a100f90b451cbc8 (diff) | |
download | vcxsrv-6f6a4d4a600eabf5d6a624eb5b0e98ee67afb52d.tar.gz vcxsrv-6f6a4d4a600eabf5d6a624eb5b0e98ee67afb52d.tar.bz2 vcxsrv-6f6a4d4a600eabf5d6a624eb5b0e98ee67afb52d.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/glx/dispatch.h
xorg-server/glx/glapi.c
xorg-server/glx/indirect_dispatch.h
xorg-server/glx/indirect_reqsize.c
xorg-server/glx/indirect_reqsize.h
xorg-server/glx/indirect_size.h
xorg-server/glx/indirect_size_get.c
xorg-server/glx/indirect_size_get.h
xorg-server/glx/indirect_table.c
xorg-server/mi/mieq.c
Diffstat (limited to 'xorg-server/mi')
-rw-r--r-- | xorg-server/mi/mieq.c | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/xorg-server/mi/mieq.c b/xorg-server/mi/mieq.c index 3d51a567b..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 && dev->spriteInfo->sprite && 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; |