mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-09 15:50:16 +01:00
Merge branch 'server-1.7-nominations' into server-1.7-branch
This commit is contained in:
commit
c25b34fe61
5 changed files with 99 additions and 30 deletions
|
|
@ -32,6 +32,7 @@ BUILTIN_SRCS = \
|
|||
|
||||
# Sources always included in libXextmodule.la & libXext.la. That's right, zero.
|
||||
MODULE_SRCS =
|
||||
MODULE_LIBS =
|
||||
|
||||
# Optional sources included if extension enabled by configure.ac rules
|
||||
|
||||
|
|
@ -83,6 +84,7 @@ endif
|
|||
XSELINUX_SRCS = xselinux.c xselinux.h
|
||||
if XSELINUX
|
||||
MODULE_SRCS += $(XSELINUX_SRCS)
|
||||
MODULE_LIBS += $(SELINUX_LIBS)
|
||||
endif
|
||||
|
||||
# Security extension: multi-level security to protect clients from each other
|
||||
|
|
@ -119,11 +121,13 @@ endif
|
|||
# Now take all of the above, mix well, bake for 10 minutes and get libXext*.la
|
||||
|
||||
libXext_la_SOURCES = $(BUILTIN_SRCS) $(MODULE_SRCS)
|
||||
libXext_la_LIBADD = $(MODULE_LIBS)
|
||||
|
||||
if XORG
|
||||
libXextbuiltin_la_SOURCES = $(BUILTIN_SRCS)
|
||||
|
||||
libXextmodule_la_SOURCES = $(MODULE_SRCS)
|
||||
libXextmodule_la_LIBADD = $(MODULE_LIBS)
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
|
|
|
|||
|
|
@ -1051,7 +1051,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
|
|||
break;
|
||||
}
|
||||
|
||||
if (DeviceEventCallback) {
|
||||
if (DeviceEventCallback && !syncEvents.playingEvents) {
|
||||
DeviceEventInfoRec eventinfo;
|
||||
SpritePtr pSprite = device->spriteInfo->sprite;
|
||||
|
||||
|
|
|
|||
|
|
@ -1326,7 +1326,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
|
|||
#
|
||||
XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${SHA1_CFLAGS}"
|
||||
XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB"
|
||||
XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SHA1_LIB} ${SELINUX_LIBS}"
|
||||
XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
|
||||
AC_SUBST([XSERVER_LIBS])
|
||||
AC_SUBST([XSERVER_SYS_LIBS])
|
||||
|
||||
|
|
|
|||
91
dix/events.c
91
dix/events.c
|
|
@ -253,33 +253,7 @@ extern BOOL EventIsKeyRepeat(xEvent *event);
|
|||
*/
|
||||
InputInfo inputInfo;
|
||||
|
||||
/**
|
||||
* syncEvents is the global structure for queued events.
|
||||
*
|
||||
* Devices can be frozen through GrabModeSync pointer grabs. If this is the
|
||||
* case, events from these devices are added to "pending" instead of being
|
||||
* processed normally. When the device is unfrozen, events in "pending" are
|
||||
* replayed and processed as if they would come from the device directly.
|
||||
*/
|
||||
static struct {
|
||||
QdEventPtr pending, /**< list of queued events */
|
||||
*pendtail; /**< last event in list */
|
||||
/** The device to replay events for. Only set in AllowEvents(), in which
|
||||
* case it is set to the device specified in the request. */
|
||||
DeviceIntPtr replayDev; /* kludgy rock to put flag for */
|
||||
|
||||
/**
|
||||
* The window the events are supposed to be replayed on.
|
||||
* This window may be set to the grab's window (but only when
|
||||
* Replay{Pointer|Keyboard} is given in the XAllowEvents()
|
||||
* request. */
|
||||
WindowPtr replayWin; /* ComputeFreezes */
|
||||
/**
|
||||
* Flag to indicate whether we're in the process of
|
||||
* replaying events. Only set in ComputeFreezes(). */
|
||||
Bool playingEvents;
|
||||
TimeStamp time;
|
||||
} syncEvents;
|
||||
EventSyncInfoRec syncEvents;
|
||||
|
||||
/**
|
||||
* The root window the given device is currently on.
|
||||
|
|
@ -3462,6 +3436,7 @@ CheckPassiveGrabsOnWindow(
|
|||
{
|
||||
DeviceIntPtr gdev;
|
||||
XkbSrvInfoPtr xkbi = NULL;
|
||||
Mask mask = 0;
|
||||
|
||||
gdev= grab->modifierDevice;
|
||||
if (grab->grabtype == GRABTYPE_CORE)
|
||||
|
|
@ -3514,6 +3489,10 @@ CheckPassiveGrabsOnWindow(
|
|||
(grab->confineTo->realized &&
|
||||
BorderSizeNotEmpty(device, grab->confineTo))))
|
||||
{
|
||||
int rc, count = 0;
|
||||
xEvent *xE = NULL;
|
||||
xEvent core;
|
||||
|
||||
event->corestate &= 0x1f00;
|
||||
event->corestate |= tempGrab.modifiersDetail.exact & (~0x1f00);
|
||||
grabinfo = &device->deviceGrab;
|
||||
|
|
@ -3560,8 +3539,62 @@ CheckPassiveGrabsOnWindow(
|
|||
}
|
||||
|
||||
|
||||
if (match & CORE_MATCH)
|
||||
{
|
||||
rc = EventToCore((InternalEvent*)event, &core);
|
||||
if (rc != Success)
|
||||
{
|
||||
if (rc != BadMatch)
|
||||
ErrorF("[dix] %s: core conversion failed in CPGFW "
|
||||
"(%d, %d).\n", device->name, event->type, rc);
|
||||
continue;
|
||||
}
|
||||
xE = &core;
|
||||
count = 1;
|
||||
mask = grab->eventMask;
|
||||
} else if (match & XI2_MATCH)
|
||||
{
|
||||
rc = EventToXI2((InternalEvent*)event, &xE);
|
||||
if (rc != Success)
|
||||
{
|
||||
if (rc != BadMatch)
|
||||
ErrorF("[dix] %s: XI2 conversion failed in CPGFW "
|
||||
"(%d, %d).\n", device->name, event->type, rc);
|
||||
continue;
|
||||
}
|
||||
count = 1;
|
||||
|
||||
/* FIXME: EventToXI2 returns NULL for enter events, so
|
||||
* dereferencing the event is bad. Internal event types are
|
||||
* aligned with core events, so the else clause is valid.
|
||||
* long-term we should use internal events for enter/focus
|
||||
* as well */
|
||||
if (xE)
|
||||
mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8];
|
||||
else if (event->type == XI_Enter || event->type == XI_FocusIn)
|
||||
mask = grab->xi2mask[device->id][event->type/8];
|
||||
} else
|
||||
{
|
||||
rc = EventToXI((InternalEvent*)event, &xE, &count);
|
||||
if (rc != Success)
|
||||
{
|
||||
if (rc != BadMatch)
|
||||
ErrorF("[dix] %s: XI conversion failed in CPGFW "
|
||||
"(%d, %d).\n", device->name, event->type, rc);
|
||||
continue;
|
||||
}
|
||||
mask = grab->eventMask;
|
||||
}
|
||||
|
||||
(*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
|
||||
DeliverGrabbedEvent((InternalEvent*)event, device, FALSE);
|
||||
|
||||
if (xE)
|
||||
{
|
||||
FixUpEventFromWindow(device, xE, grab->window, None, TRUE);
|
||||
|
||||
TryClientEvents(rClient(grab), device, xE, count, mask,
|
||||
GetEventFilter(device, xE), grab);
|
||||
}
|
||||
|
||||
if (grabinfo->sync.state == FROZEN_NO_EVENT)
|
||||
{
|
||||
|
|
@ -3571,6 +3604,8 @@ CheckPassiveGrabsOnWindow(
|
|||
grabinfo->sync.state = FROZEN_WITH_EVENT;
|
||||
}
|
||||
|
||||
if (match & (XI_MATCH | XI2_MATCH))
|
||||
xfree(xE); /* on core match xE == &core */
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -557,4 +557,34 @@ typedef struct _QdEvent {
|
|||
InternalEvent *event;
|
||||
} QdEventRec;
|
||||
|
||||
/**
|
||||
* syncEvents is the global structure for queued events.
|
||||
*
|
||||
* Devices can be frozen through GrabModeSync pointer grabs. If this is the
|
||||
* case, events from these devices are added to "pending" instead of being
|
||||
* processed normally. When the device is unfrozen, events in "pending" are
|
||||
* replayed and processed as if they would come from the device directly.
|
||||
*/
|
||||
typedef struct _EventSyncInfo {
|
||||
QdEventPtr pending, /**< list of queued events */
|
||||
*pendtail; /**< last event in list */
|
||||
/** The device to replay events for. Only set in AllowEvents(), in which
|
||||
* case it is set to the device specified in the request. */
|
||||
DeviceIntPtr replayDev; /* kludgy rock to put flag for */
|
||||
|
||||
/**
|
||||
* The window the events are supposed to be replayed on.
|
||||
* This window may be set to the grab's window (but only when
|
||||
* Replay{Pointer|Keyboard} is given in the XAllowEvents()
|
||||
* request. */
|
||||
WindowPtr replayWin; /* ComputeFreezes */
|
||||
/**
|
||||
* Flag to indicate whether we're in the process of
|
||||
* replaying events. Only set in ComputeFreezes(). */
|
||||
Bool playingEvents;
|
||||
TimeStamp time;
|
||||
} EventSyncInfoRec, *EventSyncInfoPtr;
|
||||
|
||||
extern EventSyncInfoRec syncEvents;
|
||||
|
||||
#endif /* INPUTSTRUCT_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue