diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-25 14:53:33 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-27 20:18:01 +1000 |
commit | e4edb4f2e6ca960b68629783459920faa86d8671 (patch) | |
tree | 3befab112a7eff1bea10a626780bc67e2e91b97d | |
parent | 7c9e0b07780b664ebbcee2d6be4bce645cb8c5b2 (diff) |
dmx: core events are always in screen coordinates when passed to GPE.
This fixes input in dmx, the pointer appears at the right positions to the
clients now.
Also mark the spot where we pass in the button state as valuator to GPE
with a FIXME. (??)
Tested-by: Kevin Martin
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit e7c2598f565e8252dd66ee3e6212b310856476cb)
-rw-r--r-- | hw/dmx/input/dmxevents.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c index 5c3d79215..70737b4c4 100644 --- a/hw/dmx/input/dmxevents.c +++ b/hw/dmx/input/dmxevents.c @@ -183,7 +183,7 @@ static void enqueueMotion(DevicePtr pDev, int x, int y) GetEventList(&events); nevents = GetPointerEvents(events, p, MotionNotify, detail, - POINTER_ABSOLUTE, 0, 2, valuators); + POINTER_ABSOLUTE | POINTER_SCREEN, 0, 2, valuators); for (i = 0; i < nevents; i++) mieqEnqueue(p, (InternalEvent*)(events + i)->event); return; @@ -688,7 +688,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, detail = dmxGetButtonMapping(dmxLocal, detail); GetEventList(&events); nevents = GetPointerEvents(events, p, type, detail, - POINTER_ABSOLUTE, + POINTER_ABSOLUTE | POINTER_SCREEN, 0, /* first_valuator = 0 */ 0, /* num_valuators = 0 */ valuators); @@ -700,9 +700,9 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, GetEventList(&events); valuators[0] = e->xmotion.x; valuators[1] = e->xmotion.y; - valuators[2] = e->xmotion.state; + valuators[2] = e->xmotion.state; /* FIXME: WTF?? */ nevents = GetPointerEvents(events, p, type, detail, - POINTER_ABSOLUTE, 0, 3, valuators); + POINTER_ABSOLUTE | POINTER_SCREEN, 0, 3, valuators); for (i = 0; i < nevents; i++) mieqEnqueue(p, (InternalEvent*)(events + i)->event); return; |