diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-05-17 20:16:49 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-05-17 20:16:49 +0930 |
commit | f128ce2d1f8dcd841185c728a6c2b44bb64108f6 (patch) | |
tree | 3ad42e6bb6413ea4ebe4ed11f008a6335e522db6 /src | |
parent | 12e3d8b1db94feecf27ed98c8ac523f755c59e45 (diff) |
Squish flag and same_screen into the upper bits of mode (DeviceEnterLeave).
Diffstat (limited to 'src')
-rw-r--r-- | src/XExtInt.c | 9 | ||||
-rw-r--r-- | src/XExtToWire.c | 7 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/XExtInt.c b/src/XExtInt.c index 9396da5..da88ae9 100644 --- a/src/XExtInt.c +++ b/src/XExtInt.c @@ -724,12 +724,14 @@ XInputWireToEvent(dpy, re, event) ev->x = ev2->eventX; ev->y = ev2->eventY; ev->state = ev2->state; - ev->mode = ev2->mode; + /* mode has same_screen and focus stuffed in the upper 4 bits */ + ev->mode = ev2->mode & 0xF; ev->deviceid = ev2->deviceid & DEVICE_BITS; - if (ev2->flags & ELFlagSameScreen) { + ev->detail = ev2->detail; + if ((ev2->mode >> 4) & ELFlagSameScreen) { ev->same_screen = True; } - if (ev2->flags & ELFlagFocus) { + if ((ev2->mode >> 4) & ELFlagFocus) { ev->focus = True; } return (ENQUEUE_EVENT); @@ -792,6 +794,7 @@ XInputWireToEvent(dpy, re, event) raw_event->first_valuator = raw_wire->first_valuator; raw_event->buttons = raw_wire->buttons; raw_event->deviceid = raw_wire->deviceid; + raw_event->event_type = raw_wire->event_type; if (raw_event->num_valuators) { int i; diff --git a/src/XExtToWire.c b/src/XExtToWire.c index 6c48335..5c78e34 100644 --- a/src/XExtToWire.c +++ b/src/XExtToWire.c @@ -481,12 +481,12 @@ _XiEventToWire(dpy, re, event, count) elev->rootY = ev->y_root; elev->state = ev->state; elev->mode = ev->mode; - elev->flags = 0; + elev->detail = ev->detail; if (ev->same_screen) { - elev->flags |= ELFlagSameScreen; + elev->mode |= ELFlagSameScreen << 4; } if (ev->focus) { - elev->flags |= ELFlagFocus; + elev->mode |= ELFlagFocus << 4; } break; } @@ -532,6 +532,7 @@ _XiEventToWire(dpy, re, event, count) rev->buttons = ev->buttons; rev->num_valuators = ev->num_valuators; rev->first_valuator = ev->first_valuator; + rev->event_type = ev->event_type; valptr = &rev->valuator0; for(i = 0; i < ev->num_valuators; i++, valptr++) *valptr = ev->valuators[i]; |