dix: don't set non-exisiting flags on touch events
Unlike pointer/keyboard events, the flags field for ET_Touch* is a set of server-internal defines that we need to convert to XI protocol defines. Currently only two of those defines actually translate to the protocol, so make sure we don't send internal garbage down the wire. No effect to current clients since they shouldn't look at undefined bits anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
ecf6275508
commit
b86b3d10bb
|
@ -684,17 +684,18 @@ eventToDeviceEvent(DeviceEvent *ev, xEvent **xi)
|
||||||
xde->root_x = double_to_fp1616(ev->root_x + ev->root_x_frac);
|
xde->root_x = double_to_fp1616(ev->root_x + ev->root_x_frac);
|
||||||
xde->root_y = double_to_fp1616(ev->root_y + ev->root_y_frac);
|
xde->root_y = double_to_fp1616(ev->root_y + ev->root_y_frac);
|
||||||
|
|
||||||
if (ev->type == ET_TouchUpdate)
|
if (IsTouchEvent((InternalEvent *)ev)) {
|
||||||
xde->flags |= (ev->flags & TOUCH_PENDING_END) ? XITouchPendingEnd : 0;
|
if (ev->type == ET_TouchUpdate)
|
||||||
else
|
xde->flags |= (ev->flags & TOUCH_PENDING_END) ? XITouchPendingEnd : 0;
|
||||||
|
|
||||||
|
if (ev->flags & TOUCH_POINTER_EMULATED)
|
||||||
|
xde->flags |= XITouchEmulatingPointer;
|
||||||
|
} else {
|
||||||
xde->flags = ev->flags;
|
xde->flags = ev->flags;
|
||||||
|
|
||||||
if (IsTouchEvent((InternalEvent *) ev) &&
|
if (ev->key_repeat)
|
||||||
ev->flags & TOUCH_POINTER_EMULATED)
|
xde->flags |= XIKeyRepeat;
|
||||||
xde->flags |= XITouchEmulatingPointer;
|
}
|
||||||
|
|
||||||
if (ev->key_repeat)
|
|
||||||
xde->flags |= XIKeyRepeat;
|
|
||||||
|
|
||||||
xde->mods.base_mods = ev->mods.base;
|
xde->mods.base_mods = ev->mods.base;
|
||||||
xde->mods.latched_mods = ev->mods.latched;
|
xde->mods.latched_mods = ev->mods.latched;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user