aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86Xinput.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-03 11:20:18 +0000
committermarha <marha@users.sourceforge.net>2011-02-03 11:20:18 +0000
commit46fbac6f1b19416ee1dbca883f0d09d9fd75d1eb (patch)
tree2ddc90cb6bc4f04db80d66a334ecaabf139c0176 /xorg-server/hw/xfree86/common/xf86Xinput.c
parent97f3d3043a79d6031787c246a67d2a02ff0a8d08 (diff)
parent83a4fe0dc71aafbef11477b284abe530d3877556 (diff)
downloadvcxsrv-46fbac6f1b19416ee1dbca883f0d09d9fd75d1eb.tar.gz
vcxsrv-46fbac6f1b19416ee1dbca883f0d09d9fd75d1eb.tar.bz2
vcxsrv-46fbac6f1b19416ee1dbca883f0d09d9fd75d1eb.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Xinput.c')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c
index b9006ab07..74365e10b 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.c
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.c
@@ -1011,11 +1011,6 @@ xf86PostMotionEventM(DeviceIntPtr device,
DeviceEvent *event;
int flags = 0;
-#if XFreeXDGA
- int index;
- int dx = 0, dy = 0;
-#endif
-
if (valuator_mask_num_valuators(mask) > 0)
{
if (is_absolute)
@@ -1029,7 +1024,9 @@ xf86PostMotionEventM(DeviceIntPtr device,
if (valuator_mask_isset(mask, 0) ||
valuator_mask_isset(mask, 1))
if (miPointerGetScreen(device)) {
- index = miPointerGetScreen(device)->myNum;
+ int index = miPointerGetScreen(device)->myNum;
+ int dx = 0, dy = 0;
+
if (valuator_mask_isset(mask, 0))
{
dx = valuator_mask_get(mask, 0);
@@ -1160,10 +1157,6 @@ xf86PostButtonEventM(DeviceIntPtr device,
int i = 0, nevents = 0;
int flags = 0;
-#if XFreeXDGA
- int index;
-#endif
-
if (valuator_mask_num_valuators(mask) > 0)
{
if (is_absolute)
@@ -1174,7 +1167,8 @@ xf86PostButtonEventM(DeviceIntPtr device,
#if XFreeXDGA
if (miPointerGetScreen(device)) {
- index = miPointerGetScreen(device)->myNum;
+ int index = miPointerGetScreen(device)->myNum;
+
if (DGAStealButtonEvent(device, index, button, is_down))
return;
}
@@ -1240,6 +1234,19 @@ xf86PostKeyEventM(DeviceIntPtr device,
{
int i = 0, nevents = 0;
+#if XFreeXDGA
+ DeviceIntPtr pointer;
+
+ /* Some pointers send key events, paired device is wrong then. */
+ pointer = IsPointerDevice(device) ? device : GetPairedDevice(device);
+ if (miPointerGetScreen(pointer)) {
+ int index = miPointerGetScreen(pointer)->myNum;
+
+ if (DGAStealKeyEvent(device, index, key_code, is_down))
+ return;
+ }
+#endif
+
if (is_absolute) {
nevents = GetKeyboardValuatorEvents(xf86Events, device,
is_down ? KeyPress : KeyRelease,