Merge remote-tracking branch 'whot/for-keith'
This commit is contained in:
commit
591c06277b
|
@ -1187,7 +1187,6 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
|
||||||
TouchOwnershipEvent *ev)
|
TouchOwnershipEvent *ev)
|
||||||
{
|
{
|
||||||
Bool was_owner = (resource == ti->listeners[0].listener);
|
Bool was_owner = (resource == ti->listeners[0].listener);
|
||||||
void *grab;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Send a TouchEnd event to the resource being removed, but only if they
|
/* Send a TouchEnd event to the resource being removed, but only if they
|
||||||
|
@ -1202,11 +1201,7 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
|
||||||
|
|
||||||
/* Remove the resource from the listener list, updating
|
/* Remove the resource from the listener list, updating
|
||||||
* ti->num_listeners, as well as ti->num_grabs if it was a grab. */
|
* ti->num_listeners, as well as ti->num_grabs if it was a grab. */
|
||||||
if (TouchRemoveListener(ti, resource)) {
|
TouchRemoveListener(ti, resource);
|
||||||
if (dixLookupResourceByType(&grab, resource, RT_PASSIVEGRAB,
|
|
||||||
serverClient, DixGetAttrAccess) == Success)
|
|
||||||
ti->num_grabs--;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If the current owner was removed and there are further listeners, deliver
|
/* If the current owner was removed and there are further listeners, deliver
|
||||||
* the TouchOwnership or TouchBegin event to the new owner. */
|
* the TouchOwnership or TouchBegin event to the new owner. */
|
||||||
|
@ -1300,34 +1295,19 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
|
|
||||||
if (listener->type == LISTENER_GRAB ||
|
if (listener->type == LISTENER_GRAB ||
|
||||||
listener->type == LISTENER_POINTER_GRAB) {
|
listener->type == LISTENER_POINTER_GRAB) {
|
||||||
rc = dixLookupResourceByType((pointer *) grab, listener->listener,
|
|
||||||
RT_PASSIVEGRAB,
|
|
||||||
serverClient, DixSendAccess);
|
|
||||||
if (rc != Success) {
|
|
||||||
/* the grab doesn't exist but we have a grabbing listener - this
|
|
||||||
* is an implicit/active grab */
|
|
||||||
rc = dixLookupClient(client, listener->listener, serverClient,
|
|
||||||
DixSendAccess);
|
|
||||||
if (rc != Success)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
*grab = dev->deviceGrab.grab;
|
*grab = listener->grab;
|
||||||
if (!*grab)
|
|
||||||
return FALSE;
|
BUG_RETURN_VAL(!*grab, FALSE);
|
||||||
}
|
|
||||||
|
|
||||||
*client = rClient(*grab);
|
*client = rClient(*grab);
|
||||||
*win = (*grab)->window;
|
*win = (*grab)->window;
|
||||||
*mask = (*grab)->xi2mask;
|
*mask = (*grab)->xi2mask;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (listener->level == CORE)
|
rc = dixLookupResourceByType((pointer *) win, listener->listener,
|
||||||
rc = dixLookupWindow(win, listener->listener,
|
listener->resource_type,
|
||||||
serverClient, DixSendAccess);
|
serverClient, DixSendAccess);
|
||||||
else
|
|
||||||
rc = dixLookupResourceByType((pointer *) win, listener->listener,
|
|
||||||
RT_INPUTCLIENT,
|
|
||||||
serverClient, DixSendAccess);
|
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -1467,6 +1447,8 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
*/
|
*/
|
||||||
l = &ti->listeners[ti->num_listeners - 1];
|
l = &ti->listeners[ti->num_listeners - 1];
|
||||||
l->listener = devgrab->resource;
|
l->listener = devgrab->resource;
|
||||||
|
l->grab = devgrab;
|
||||||
|
//l->resource_type = RT_NONE;
|
||||||
|
|
||||||
if (devgrab->grabtype != XI2 || devgrab->type != XI_TouchBegin)
|
if (devgrab->grabtype != XI2 || devgrab->type != XI_TouchBegin)
|
||||||
l->type = LISTENER_POINTER_GRAB;
|
l->type = LISTENER_POINTER_GRAB;
|
||||||
|
|
21
dix/events.c
21
dix/events.c
|
@ -1438,6 +1438,7 @@ UpdateTouchesForGrab(DeviceIntPtr mouse)
|
||||||
ti->listeners[0].type = LISTENER_POINTER_GRAB;
|
ti->listeners[0].type = LISTENER_POINTER_GRAB;
|
||||||
else
|
else
|
||||||
ti->listeners[0].type = LISTENER_GRAB;
|
ti->listeners[0].type = LISTENER_GRAB;
|
||||||
|
ti->listeners[0].grab = grab;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1521,7 +1522,7 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
|
||||||
emulate a ButtonRelease here. So pretend the listener
|
emulate a ButtonRelease here. So pretend the listener
|
||||||
already has the end event */
|
already has the end event */
|
||||||
if (grab->grabtype == CORE || grab->grabtype == XI ||
|
if (grab->grabtype == CORE || grab->grabtype == XI ||
|
||||||
!xi2mask_isset(dev->deviceGrab.grab->xi2mask, dev, XI_TouchBegin))
|
!xi2mask_isset(mouse->deviceGrab.grab->xi2mask, mouse, XI_TouchBegin))
|
||||||
ti->listeners[0].state = LISTENER_HAS_END;
|
ti->listeners[0].state = LISTENER_HAS_END;
|
||||||
TouchListenerAcceptReject(mouse, ti, 0, XIRejectTouch);
|
TouchListenerAcceptReject(mouse, ti, 0, XIRejectTouch);
|
||||||
}
|
}
|
||||||
|
@ -1550,15 +1551,6 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
|
||||||
ReattachToOldMaster(mouse);
|
ReattachToOldMaster(mouse);
|
||||||
|
|
||||||
ComputeFreezes();
|
ComputeFreezes();
|
||||||
|
|
||||||
/* If an explicit grab was deactivated, we must remove it from the head of
|
|
||||||
* all the touches' listener lists. */
|
|
||||||
for (i = 0; mouse->touch && i < mouse->touch->num_touches; i++) {
|
|
||||||
TouchPointInfoPtr ti = mouse->touch->touches + i;
|
|
||||||
|
|
||||||
if (ti->active && TouchResourceIsOwner(ti, grab_resource))
|
|
||||||
TouchListenerAcceptReject(mouse, ti, 0, XIRejectTouch);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2246,7 +2238,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
|
||||||
* @return TRUE if the event should be discarded, FALSE otherwise.
|
* @return TRUE if the event should be discarded, FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
static BOOL
|
static BOOL
|
||||||
FilterRawEvents(const ClientPtr client, const GrabPtr grab)
|
FilterRawEvents(const ClientPtr client, const GrabPtr grab, WindowPtr root)
|
||||||
{
|
{
|
||||||
XIClientPtr client_xi_version;
|
XIClientPtr client_xi_version;
|
||||||
int cmp;
|
int cmp;
|
||||||
|
@ -2262,7 +2254,10 @@ FilterRawEvents(const ClientPtr client, const GrabPtr grab)
|
||||||
client_xi_version->minor_version, 2, 0);
|
client_xi_version->minor_version, 2, 0);
|
||||||
/* XI 2.0: if device is grabbed, skip
|
/* XI 2.0: if device is grabbed, skip
|
||||||
XI 2.1: if device is grabbed by us, skip, we've already delivered */
|
XI 2.1: if device is grabbed by us, skip, we've already delivered */
|
||||||
return (cmp == 0) ? TRUE : SameClient(grab, client);
|
if (cmp == 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return (grab->window != root) ? FALSE : SameClient(grab, client);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2315,7 +2310,7 @@ DeliverRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
|
||||||
*/
|
*/
|
||||||
ic.next = NULL;
|
ic.next = NULL;
|
||||||
|
|
||||||
if (!FilterRawEvents(rClient(&ic), grab))
|
if (!FilterRawEvents(rClient(&ic), grab, root))
|
||||||
DeliverEventToInputClients(device, &ic, root, xi, 1,
|
DeliverEventToInputClients(device, &ic, root, xi, 1,
|
||||||
filter, NULL, &c, &m);
|
filter, NULL, &c, &m);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1895,16 +1895,16 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
|
||||||
if (!mask_in ||
|
if (!mask_in ||
|
||||||
!valuator_mask_isset(mask_in, 0) ||
|
!valuator_mask_isset(mask_in, 0) ||
|
||||||
!valuator_mask_isset(mask_in, 1)) {
|
!valuator_mask_isset(mask_in, 1)) {
|
||||||
ErrorF("%s: Attempted to start touch without x/y (driver bug)\n",
|
ErrorFSigSafe("%s: Attempted to start touch without x/y "
|
||||||
dev->name);
|
"(driver bug)\n", dev->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XI_TouchUpdate:
|
case XI_TouchUpdate:
|
||||||
event->type = ET_TouchUpdate;
|
event->type = ET_TouchUpdate;
|
||||||
if (!mask_in || valuator_mask_num_valuators(mask_in) <= 0) {
|
if (!mask_in || valuator_mask_num_valuators(mask_in) <= 0) {
|
||||||
ErrorF("%s: TouchUpdate with no valuators? Driver bug\n",
|
ErrorFSigSafe("%s: TouchUpdate with no valuators? Driver bug\n",
|
||||||
dev->name);
|
dev->name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XI_TouchEnd:
|
case XI_TouchEnd:
|
||||||
|
|
|
@ -738,7 +738,7 @@ ApplyConstantDeceleration(DeviceVelocityPtr vel, double *fdx, double *fdy)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* compute the acceleration for given velocity and enforce min_acceleartion
|
* compute the acceleration for given velocity and enforce min_acceleration
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
BasicComputeAcceleration(DeviceIntPtr dev,
|
BasicComputeAcceleration(DeviceIntPtr dev,
|
||||||
|
|
38
dix/touch.c
38
dix/touch.c
|
@ -675,15 +675,20 @@ TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource)
|
||||||
* Add the resource to this touch's listeners.
|
* Add the resource to this touch's listeners.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TouchAddListener(TouchPointInfoPtr ti, XID resource, enum InputLevel level,
|
TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type,
|
||||||
enum TouchListenerType type, enum TouchListenerState state,
|
enum InputLevel level, enum TouchListenerType type,
|
||||||
WindowPtr window)
|
enum TouchListenerState state, WindowPtr window,
|
||||||
|
GrabPtr grab)
|
||||||
{
|
{
|
||||||
ti->listeners[ti->num_listeners].listener = resource;
|
ti->listeners[ti->num_listeners].listener = resource;
|
||||||
|
ti->listeners[ti->num_listeners].resource_type = resource_type;
|
||||||
ti->listeners[ti->num_listeners].level = level;
|
ti->listeners[ti->num_listeners].level = level;
|
||||||
ti->listeners[ti->num_listeners].state = state;
|
ti->listeners[ti->num_listeners].state = state;
|
||||||
ti->listeners[ti->num_listeners].type = type;
|
ti->listeners[ti->num_listeners].type = type;
|
||||||
ti->listeners[ti->num_listeners].window = window;
|
ti->listeners[ti->num_listeners].window = window;
|
||||||
|
ti->listeners[ti->num_listeners].grab = grab;
|
||||||
|
if (grab)
|
||||||
|
ti->num_grabs++;
|
||||||
ti->num_listeners++;
|
ti->num_listeners++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -702,6 +707,11 @@ TouchRemoveListener(TouchPointInfoPtr ti, XID resource)
|
||||||
if (ti->listeners[i].listener == resource) {
|
if (ti->listeners[i].listener == resource) {
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
|
if (ti->listeners[i].grab) {
|
||||||
|
ti->listeners[i].grab = NULL;
|
||||||
|
ti->num_grabs--;
|
||||||
|
}
|
||||||
|
|
||||||
for (j = i; j < ti->num_listeners - 1; j++)
|
for (j = i; j < ti->num_listeners - 1; j++)
|
||||||
ti->listeners[j] = ti->listeners[j + 1];
|
ti->listeners[j] = ti->listeners[j + 1];
|
||||||
ti->num_listeners--;
|
ti->num_listeners--;
|
||||||
|
@ -732,9 +742,9 @@ TouchAddGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
type = LISTENER_POINTER_GRAB;
|
type = LISTENER_POINTER_GRAB;
|
||||||
}
|
}
|
||||||
|
|
||||||
TouchAddListener(ti, grab->resource, grab->grabtype,
|
/* grab listeners are always RT_NONE since we keep the grab pointer */
|
||||||
type, LISTENER_AWAITING_BEGIN, grab->window);
|
TouchAddListener(ti, grab->resource, RT_NONE, grab->grabtype,
|
||||||
ti->num_grabs++;
|
type, LISTENER_AWAITING_BEGIN, grab->window, grab);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -789,8 +799,8 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
if (!xi2mask_isset(iclients->xi2mask, dev, XI_TouchOwnership))
|
if (!xi2mask_isset(iclients->xi2mask, dev, XI_TouchOwnership))
|
||||||
TouchEventHistoryAllocate(ti);
|
TouchEventHistoryAllocate(ti);
|
||||||
|
|
||||||
TouchAddListener(ti, iclients->resource, XI2,
|
TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI2,
|
||||||
type, LISTENER_AWAITING_BEGIN, win);
|
type, LISTENER_AWAITING_BEGIN, win, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -804,9 +814,9 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
TouchEventHistoryAllocate(ti);
|
TouchEventHistoryAllocate(ti);
|
||||||
TouchAddListener(ti, iclients->resource, XI,
|
TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI,
|
||||||
LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
|
LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
|
||||||
win);
|
win, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -819,9 +829,9 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
/* window owner */
|
/* window owner */
|
||||||
if (IsMaster(dev) && (win->eventMask & core_filter)) {
|
if (IsMaster(dev) && (win->eventMask & core_filter)) {
|
||||||
TouchEventHistoryAllocate(ti);
|
TouchEventHistoryAllocate(ti);
|
||||||
TouchAddListener(ti, win->drawable.id, CORE,
|
TouchAddListener(ti, win->drawable.id, RT_WINDOW, CORE,
|
||||||
LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
|
LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
|
||||||
win);
|
win, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -831,8 +841,8 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
TouchEventHistoryAllocate(ti);
|
TouchEventHistoryAllocate(ti);
|
||||||
TouchAddListener(ti, oclients->resource, CORE,
|
TouchAddListener(ti, oclients->resource, RT_OTHERCLIENT, CORE,
|
||||||
type, LISTENER_AWAITING_BEGIN, win);
|
type, LISTENER_AWAITING_BEGIN, win, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1033,6 +1033,9 @@ DGAProcessKeyboardEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr keybd)
|
||||||
|
|
||||||
UpdateDeviceState(keybd, &ev);
|
UpdateDeviceState(keybd, &ev);
|
||||||
|
|
||||||
|
if (!IsMaster(keybd))
|
||||||
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Deliver the DGA event
|
* Deliver the DGA event
|
||||||
*/
|
*/
|
||||||
|
@ -1074,6 +1077,7 @@ DGAProcessPointerEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr mouse)
|
||||||
DeviceEvent ev = {
|
DeviceEvent ev = {
|
||||||
.header = ET_Internal,
|
.header = ET_Internal,
|
||||||
.length = sizeof(ev),
|
.length = sizeof(ev),
|
||||||
|
.detail.key = event->detail,
|
||||||
.type = event->subtype,
|
.type = event->subtype,
|
||||||
.corestate = butc ? butc->state : 0
|
.corestate = butc ? butc->state : 0
|
||||||
};
|
};
|
||||||
|
@ -1083,6 +1087,9 @@ DGAProcessPointerEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr mouse)
|
||||||
|
|
||||||
UpdateDeviceState(mouse, &ev);
|
UpdateDeviceState(mouse, &ev);
|
||||||
|
|
||||||
|
if (!IsMaster(mouse))
|
||||||
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Deliver the DGA event
|
* Deliver the DGA event
|
||||||
*/
|
*/
|
||||||
|
@ -1190,9 +1197,6 @@ DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device)
|
||||||
if (!pScreenPriv)
|
if (!pScreenPriv)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!IsMaster(device))
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (event->subtype) {
|
switch (event->subtype) {
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
case KeyRelease:
|
case KeyRelease:
|
||||||
|
|
|
@ -619,14 +619,16 @@ InputHandlerProc
|
||||||
xf86SetConsoleHandler(InputHandlerProc proc, pointer data)
|
xf86SetConsoleHandler(InputHandlerProc proc, pointer data)
|
||||||
{
|
{
|
||||||
static IHPtr handler = NULL;
|
static IHPtr handler = NULL;
|
||||||
IHPtr old_handler = handler;
|
InputHandlerProc old_proc = NULL;
|
||||||
|
|
||||||
if (old_handler)
|
if (handler) {
|
||||||
xf86RemoveGeneralHandler(old_handler);
|
old_proc = handler->ihproc;
|
||||||
|
xf86RemoveGeneralHandler(handler);
|
||||||
|
}
|
||||||
|
|
||||||
handler = xf86AddGeneralHandler(xf86Info.consoleFd, proc, data);
|
handler = xf86AddGeneralHandler(xf86Info.consoleFd, proc, data);
|
||||||
|
|
||||||
return (old_handler) ? old_handler->ihproc : NULL;
|
return old_proc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -81,7 +81,7 @@ typedef enum {
|
||||||
*/
|
*/
|
||||||
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
|
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
|
||||||
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(14, 1)
|
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(14, 1)
|
||||||
#define ABI_XINPUT_VERSION SET_ABI_VERSION(18, 0)
|
#define ABI_XINPUT_VERSION SET_ABI_VERSION(19, 0)
|
||||||
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(7, 0)
|
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(7, 0)
|
||||||
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
|
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
|
||||||
|
|
||||||
|
|
|
@ -515,7 +515,7 @@ ParseOptionValue(int scrnIndex, XF86OptionPtr options, OptionInfoPtr p,
|
||||||
if (*s == '\0') {
|
if (*s == '\0') {
|
||||||
if (markUsed) {
|
if (markUsed) {
|
||||||
xf86DrvMsg(scrnIndex, X_WARNING,
|
xf86DrvMsg(scrnIndex, X_WARNING,
|
||||||
"Option \"%s\" requires an string value\n",
|
"Option \"%s\" requires a string value\n",
|
||||||
p->name);
|
p->name);
|
||||||
}
|
}
|
||||||
p->found = FALSE;
|
p->found = FALSE;
|
||||||
|
|
|
@ -762,7 +762,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p)
|
||||||
case OPTV_STRING:
|
case OPTV_STRING:
|
||||||
if (*s == '\0') {
|
if (*s == '\0') {
|
||||||
winDrvMsg(scrnIndex, X_WARNING,
|
winDrvMsg(scrnIndex, X_WARNING,
|
||||||
"Option \"%s\" requires an string value\n", p->name);
|
"Option \"%s\" requires a string value\n", p->name);
|
||||||
p->found = FALSE;
|
p->found = FALSE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -565,9 +565,9 @@ extern void TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev);
|
||||||
extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev,
|
extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev,
|
||||||
XID resource);
|
XID resource);
|
||||||
extern Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource);
|
extern Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource);
|
||||||
extern void TouchAddListener(TouchPointInfoPtr ti, XID resource,
|
extern void TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type,
|
||||||
enum InputLevel level, enum TouchListenerType type,
|
enum InputLevel level, enum TouchListenerType type,
|
||||||
enum TouchListenerState state, WindowPtr window);
|
enum TouchListenerState state, WindowPtr window, GrabPtr grab);
|
||||||
extern Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource);
|
extern Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource);
|
||||||
extern void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
extern void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
InternalEvent *ev);
|
InternalEvent *ev);
|
||||||
|
|
|
@ -298,6 +298,17 @@ typedef struct _ValuatorClassRec {
|
||||||
int v_scroll_axis; /* vert smooth-scrolling axis */
|
int v_scroll_axis; /* vert smooth-scrolling axis */
|
||||||
} ValuatorClassRec;
|
} ValuatorClassRec;
|
||||||
|
|
||||||
|
typedef struct _TouchListener {
|
||||||
|
XID listener; /* grabs/event selection IDs receiving
|
||||||
|
* events for this touch */
|
||||||
|
int resource_type; /* listener's resource type */
|
||||||
|
enum TouchListenerType type;
|
||||||
|
enum TouchListenerState state;
|
||||||
|
enum InputLevel level; /* matters only for emulating touches */
|
||||||
|
WindowPtr window;
|
||||||
|
GrabPtr grab;
|
||||||
|
} TouchListener;
|
||||||
|
|
||||||
typedef struct _TouchPointInfo {
|
typedef struct _TouchPointInfo {
|
||||||
uint32_t client_id; /* touch ID as seen in client events */
|
uint32_t client_id; /* touch ID as seen in client events */
|
||||||
int sourceid; /* Source device's ID for this touchpoint */
|
int sourceid; /* Source device's ID for this touchpoint */
|
||||||
|
@ -306,14 +317,7 @@ typedef struct _TouchPointInfo {
|
||||||
* but still owned by a grab */
|
* but still owned by a grab */
|
||||||
SpriteRec sprite; /* window trace for delivery */
|
SpriteRec sprite; /* window trace for delivery */
|
||||||
ValuatorMask *valuators; /* last recorded axis values */
|
ValuatorMask *valuators; /* last recorded axis values */
|
||||||
struct _TouchListener {
|
TouchListener *listeners; /* set of listeners */
|
||||||
XID listener; /* grabs/event selection IDs receiving
|
|
||||||
* events for this touch */
|
|
||||||
enum TouchListenerType type;
|
|
||||||
enum TouchListenerState state;
|
|
||||||
enum InputLevel level; /* matters only for emulating touches */
|
|
||||||
WindowPtr window;
|
|
||||||
} *listeners;
|
|
||||||
int num_listeners;
|
int num_listeners;
|
||||||
int num_grabs; /* number of open grabs on this touch
|
int num_grabs; /* number of open grabs on this touch
|
||||||
* which have not accepted or rejected */
|
* which have not accepted or rejected */
|
||||||
|
|
|
@ -627,7 +627,11 @@ mieqProcessInputEvents(void)
|
||||||
mieqProcessDeviceEvent(dev, &event, screen);
|
mieqProcessDeviceEvent(dev, &event, screen);
|
||||||
|
|
||||||
/* Update the sprite now. Next event may be from different device. */
|
/* Update the sprite now. Next event may be from different device. */
|
||||||
if (event.any.type == ET_Motion && master)
|
if (master &&
|
||||||
|
(event.any.type == ET_Motion ||
|
||||||
|
((event.any.type == ET_TouchBegin ||
|
||||||
|
event.any.type == ET_TouchUpdate) &&
|
||||||
|
event.device_event.flags & TOUCH_POINTER_EMULATED)))
|
||||||
miPointerUpdateSprite(dev);
|
miPointerUpdateSprite(dev);
|
||||||
|
|
||||||
#ifdef XQUARTZ
|
#ifdef XQUARTZ
|
||||||
|
|
|
@ -143,6 +143,8 @@ AnimCurScreenBlockHandler(ScreenPtr pScreen,
|
||||||
Bool activeDevice = FALSE;
|
Bool activeDevice = FALSE;
|
||||||
CARD32 now = 0, soonest = ~0; /* earliest time to wakeup again */
|
CARD32 now = 0, soonest = ~0; /* earliest time to wakeup again */
|
||||||
|
|
||||||
|
Unwrap(as, pScreen, BlockHandler);
|
||||||
|
|
||||||
for (dev = inputInfo.devices; dev; dev = dev->next) {
|
for (dev = inputInfo.devices; dev; dev = dev->next) {
|
||||||
if (IsPointerDevice(dev) && pScreen == dev->spriteInfo->anim.pScreen) {
|
if (IsPointerDevice(dev) && pScreen == dev->spriteInfo->anim.pScreen) {
|
||||||
if (!activeDevice) {
|
if (!activeDevice) {
|
||||||
|
@ -180,7 +182,6 @@ AnimCurScreenBlockHandler(ScreenPtr pScreen,
|
||||||
if (activeDevice)
|
if (activeDevice)
|
||||||
AdjustWaitForDelay(pTimeout, soonest - now);
|
AdjustWaitForDelay(pTimeout, soonest - now);
|
||||||
|
|
||||||
Unwrap(as, pScreen, BlockHandler);
|
|
||||||
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
|
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
|
||||||
if (activeDevice)
|
if (activeDevice)
|
||||||
Wrap(as, pScreen, BlockHandler, AnimCurScreenBlockHandler);
|
Wrap(as, pScreen, BlockHandler, AnimCurScreenBlockHandler);
|
||||||
|
|
|
@ -68,7 +68,7 @@ __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access)
|
||||||
* This function overrides the one in the screen rec.
|
* This function overrides the one in the screen rec.
|
||||||
*/
|
*/
|
||||||
static Bool
|
static Bool
|
||||||
ScreenSetCursorPosition(DeviceIntPtr dev, ScreenPtr screen,
|
ScreenSetCursorPosition(DeviceIntPtr dev, ScreenPtr scr,
|
||||||
int x, int y, Bool generateEvent)
|
int x, int y, Bool generateEvent)
|
||||||
{
|
{
|
||||||
assert(x == expected_x);
|
assert(x == expected_x);
|
||||||
|
|
|
@ -642,6 +642,7 @@ XkbComputeCompatState(XkbSrvInfoPtr xkbi)
|
||||||
CARD16 grp_mask;
|
CARD16 grp_mask;
|
||||||
XkbStatePtr state = &xkbi->state;
|
XkbStatePtr state = &xkbi->state;
|
||||||
XkbCompatMapPtr map;
|
XkbCompatMapPtr map;
|
||||||
|
XkbControlsPtr ctrls;
|
||||||
|
|
||||||
if (!state || !xkbi->desc || !xkbi->desc->ctrls || !xkbi->desc->compat)
|
if (!state || !xkbi->desc || !xkbi->desc->ctrls || !xkbi->desc->compat)
|
||||||
return;
|
return;
|
||||||
|
@ -650,9 +651,14 @@ XkbComputeCompatState(XkbSrvInfoPtr xkbi)
|
||||||
grp_mask = map->groups[state->group].mask;
|
grp_mask = map->groups[state->group].mask;
|
||||||
state->compat_state = state->mods | grp_mask;
|
state->compat_state = state->mods | grp_mask;
|
||||||
state->compat_lookup_mods = state->lookup_mods | grp_mask;
|
state->compat_lookup_mods = state->lookup_mods | grp_mask;
|
||||||
|
ctrls= xkbi->desc->ctrls;
|
||||||
|
|
||||||
if (xkbi->desc->ctrls->enabled_ctrls & XkbIgnoreGroupLockMask)
|
if (ctrls->enabled_ctrls & XkbIgnoreGroupLockMask) {
|
||||||
grp_mask = map->groups[state->base_group].mask;
|
unsigned char grp = state->base_group+state->latched_group;
|
||||||
|
if (grp >= ctrls->num_groups)
|
||||||
|
grp = XkbAdjustGroup(XkbCharToInt(grp), ctrls);
|
||||||
|
grp_mask = map->groups[grp].mask;
|
||||||
|
}
|
||||||
state->compat_grab_mods = state->grab_mods | grp_mask;
|
state->compat_grab_mods = state->grab_mods | grp_mask;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue