diff options
author | Ville Syrjala <syrjala@sci.fi> | 2011-01-24 01:06:47 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-01-27 14:22:03 +1000 |
commit | 9f09b62e594321a8e45a33f4f13559827d660ed3 (patch) | |
tree | 652a9bb3f79f9d5e4be9ccf27a990db3451224bf | |
parent | 5c941c04ca68cdc2b236c524970bc23f91906af4 (diff) |
xfree86/dga: Remove useless ifdefs
Move some variables to the scope where they are used.
Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | hw/xfree86/common/xf86Xinput.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 6fdf1eb06..74365e10b 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/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; } @@ -1241,13 +1235,13 @@ xf86PostKeyEventM(DeviceIntPtr device, int i = 0, nevents = 0; #if XFreeXDGA - int index; DeviceIntPtr pointer; /* Some pointers send key events, paired device is wrong then. */ pointer = IsPointerDevice(device) ? device : GetPairedDevice(device); if (miPointerGetScreen(pointer)) { - index = miPointerGetScreen(pointer)->myNum; + int index = miPointerGetScreen(pointer)->myNum; + if (DGAStealKeyEvent(device, index, key_code, is_down)) return; } |