dix: export subpixel precision in XI2 events for root/event coordinates.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
bae070914f
commit
00bc043fa0
|
@ -385,8 +385,8 @@ eventToDeviceEvent(DeviceEvent *ev, xEvent **xi)
|
|||
xde->valuators_len = vallen;
|
||||
xde->deviceid = ev->deviceid;
|
||||
xde->sourceid = ev->sourceid;
|
||||
xde->root_x = FP1616(ev->root_x, 0);
|
||||
xde->root_y = FP1616(ev->root_y, 0);
|
||||
xde->root_x = FP1616(ev->root_x, ev->root_x_frac);
|
||||
xde->root_y = FP1616(ev->root_y, ev->root_y_frac);
|
||||
|
||||
xde->mods.base_mods = ev->mods.base;
|
||||
xde->mods.latched_mods = ev->mods.latched;
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "dixevents.h"
|
||||
#include "mipointer.h"
|
||||
#include "events.h"
|
||||
#include "eventconvert.h"
|
||||
|
||||
#include <X11/extensions/XKBproto.h>
|
||||
#include "xkbsrv.h"
|
||||
|
@ -1070,9 +1071,10 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
|
|||
event->detail.button = buttons;
|
||||
}
|
||||
|
||||
/* XXX: this should be 16.16 fixed point */
|
||||
event->root_x = cx; /* root_x/y always in screen coords */
|
||||
event->root_y = cy;
|
||||
event->root_x_frac = pDev->last.remainder[0];
|
||||
event->root_y_frac = pDev->last.remainder[1];
|
||||
|
||||
set_valuators(pDev, event, first_valuator, num_valuators, valuators);
|
||||
|
||||
|
|
|
@ -86,8 +86,10 @@ typedef struct
|
|||
uint32_t button; /**< Button number */
|
||||
uint32_t key; /**< Key code */
|
||||
} detail;
|
||||
uint32_t root_x; /**< Pos relative to root window in 16.16 fixed pt */
|
||||
uint32_t root_y; /**< Pos relative to root window in 16.16 fixed pt */
|
||||
uint16_t root_x; /**< Pos relative to root window in integral data */
|
||||
float root_x_frac; /**< Pos relative to root window in frac part */
|
||||
uint16_t root_y; /**< Pos relative to root window in integral part */
|
||||
float root_y_frac; /**< Pos relative to root window in frac part */
|
||||
uint8_t buttons[(MAX_BUTTONS + 7)/8]; /**< Button mask */
|
||||
struct {
|
||||
uint8_t mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */
|
||||
|
|
Loading…
Reference in New Issue
Block a user