summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2013-11-11 15:12:36 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2013-11-11 15:12:36 +0000
commit3db018e7393bf3fef34af94b5902609dcf59c0f1 (patch)
tree15c23e44a97db8247a78ae9f1b5750fc052ab830
parent1b3a31deee411a1f50a8a5e55b2c4d6b10699698 (diff)
parent4c40d9c4e4e4b39e81097cf6152d9940422fb5ab (diff)
Merge tag 'xorg-server-1.14.4' into cygwin-release-1.14
xorg-server-1.14.4
-rw-r--r--Xext/saver.c6
-rw-r--r--Xext/sync.c121
-rw-r--r--Xi/xiallowev.c2
-rw-r--r--configure.ac8
-rw-r--r--dix/dixfonts.c5
-rw-r--r--dix/events.c120
-rw-r--r--dix/globals.c1
-rw-r--r--dix/window.c5
-rw-r--r--hw/xfree86/parser/write.c2
-rw-r--r--include/dix.h11
-rw-r--r--include/dixstruct.h1
-rw-r--r--include/input.h6
-rw-r--r--include/xorg-config.h.in3
-rw-r--r--mi/miinitext.c2
-rw-r--r--os/WaitFor.c2
-rw-r--r--os/xdmcp.c2
-rw-r--r--test/hashtabletest.c4
-rw-r--r--test/signal-logging.c3
18 files changed, 210 insertions, 94 deletions
diff --git a/Xext/saver.c b/Xext/saver.c
index fe81bc4d7..e06f40837 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -392,9 +392,7 @@ ScreenSaverFreeSuspend(pointer value, XID id)
DeviceIntPtr dev;
UpdateCurrentTimeIf();
nt_list_for_each_entry(dev, inputInfo.devices, next)
- lastDeviceEventTime[dev->id] = currentTime;
- lastDeviceEventTime[XIAllDevices] = currentTime;
- lastDeviceEventTime[XIAllMasterDevices] = currentTime;
+ NoticeTime(dev, currentTime);
SetScreenSaverTimer();
}
}
@@ -681,7 +679,7 @@ ProcScreenSaverQueryInfo(ClientPtr client)
pPriv = GetScreenPrivate(pDraw->pScreen);
UpdateCurrentTime();
- lastInput = GetTimeInMillis() - lastDeviceEventTime[XIAllDevices].milliseconds;
+ lastInput = GetTimeInMillis() - LastEventTime(XIAllDevices).milliseconds;
rep = (xScreenSaverQueryInfoReply) {
.type = X_Reply,
diff --git a/Xext/sync.c b/Xext/sync.c
index 4d11992bb..9b4d0a474 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -699,6 +699,14 @@ SyncAwaitTriggerFired(SyncTrigger * pTrigger)
FreeResource(pAwaitUnion->header.delete_id, RT_NONE);
}
+static CARD64
+SyncUpdateCounter(SyncCounter *pCounter, CARD64 newval)
+{
+ CARD64 oldval = pCounter->value;
+ pCounter->value = newval;
+ return oldval;
+}
+
/* This function should always be used to change a counter's value so that
* any triggers depending on the counter will be checked.
*/
@@ -708,8 +716,7 @@ SyncChangeCounter(SyncCounter * pCounter, CARD64 newval)
SyncTriggerList *ptl, *pnext;
CARD64 oldval;
- oldval = pCounter->value;
- pCounter->value = newval;
+ oldval = SyncUpdateCounter(pCounter, newval);
/* run through triggers to see if any become true */
for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) {
@@ -1019,6 +1026,11 @@ SyncComputeBracketValues(SyncCounter * pCounter)
psci->bracket_greater = pTrigger->test_value;
pnewgtval = &psci->bracket_greater;
}
+ else if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) &&
+ XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) {
+ psci->bracket_less = pTrigger->test_value;
+ pnewltval = &psci->bracket_less;
+ }
}
else if (pTrigger->test_type == XSyncNegativeComparison &&
ct != XSyncCounterNeverDecreases) {
@@ -1028,52 +1040,53 @@ SyncComputeBracketValues(SyncCounter * pCounter)
psci->bracket_less = pTrigger->test_value;
pnewltval = &psci->bracket_less;
}
+ else if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) &&
+ XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) {
+ psci->bracket_greater = pTrigger->test_value;
+ pnewgtval = &psci->bracket_greater;
+ }
}
else if (pTrigger->test_type == XSyncNegativeTransition &&
ct != XSyncCounterNeverIncreases) {
- if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) &&
- XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less))
- {
- psci->bracket_less = pTrigger->test_value;
- pnewltval = &psci->bracket_less;
+ if (XSyncValueGreaterOrEqual(pCounter->value, pTrigger->test_value) &&
+ XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) {
+ /*
+ * If the value is exactly equal to our threshold, we want one
+ * more event in the negative direction to ensure we pick up
+ * when the value is less than this threshold.
+ */
+ psci->bracket_less = pTrigger->test_value;
+ pnewltval = &psci->bracket_less;
}
- else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) &&
- XSyncValueGreaterThan(pTrigger->test_value,
- psci->bracket_less)) {
- /*
- * The value is exactly equal to our threshold. We want one
- * more event in the negative direction to ensure we pick up
- * when the value is less than this threshold.
- */
- psci->bracket_less = pTrigger->test_value;
- pnewltval = &psci->bracket_less;
+ else if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) &&
+ XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) {
+ psci->bracket_greater = pTrigger->test_value;
+ pnewgtval = &psci->bracket_greater;
}
}
else if (pTrigger->test_type == XSyncPositiveTransition &&
ct != XSyncCounterNeverDecreases) {
- if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) &&
- XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater))
- {
- psci->bracket_greater = pTrigger->test_value;
- pnewgtval = &psci->bracket_greater;
+ if (XSyncValueLessOrEqual(pCounter->value, pTrigger->test_value) &&
+ XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) {
+ /*
+ * If the value is exactly equal to our threshold, we
+ * want one more event in the positive direction to
+ * ensure we pick up when the value *exceeds* this
+ * threshold.
+ */
+ psci->bracket_greater = pTrigger->test_value;
+ pnewgtval = &psci->bracket_greater;
}
- else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) &&
- XSyncValueLessThan(pTrigger->test_value,
- psci->bracket_greater)) {
- /*
- * The value is exactly equal to our threshold. We want one
- * more event in the positive direction to ensure we pick up
- * when the value *exceeds* this threshold.
- */
- psci->bracket_greater = pTrigger->test_value;
- pnewgtval = &psci->bracket_greater;
+ else if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) &&
+ XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) {
+ psci->bracket_less = pTrigger->test_value;
+ pnewltval = &psci->bracket_less;
}
}
} /* end for each trigger */
- if (pnewgtval || pnewltval) {
- (*psci->BracketValues) ((pointer) pCounter, pnewltval, pnewgtval);
- }
+ (*psci->BracketValues) ((pointer) pCounter, pnewltval, pnewgtval);
+
}
/*
@@ -2619,7 +2632,7 @@ IdleTimeQueryValue(pointer pCounter, CARD64 * pValue_return)
}
else
deviceid = XIAllDevices;
- idle = GetTimeInMillis() - lastDeviceEventTime[deviceid].milliseconds;
+ idle = GetTimeInMillis() - LastEventTime(deviceid).milliseconds;
XSyncIntsToValue(pValue_return, idle, 0);
}
@@ -2638,7 +2651,7 @@ IdleTimeBlockHandler(pointer pCounter, struct timeval **wt, pointer LastSelectMa
return;
old_idle = counter->value;
- IdleTimeQueryValue(NULL, &idle);
+ IdleTimeQueryValue(counter, &idle);
counter->value = idle; /* push, so CheckTrigger works */
if (less && XSyncValueLessOrEqual(idle, *less)) {
@@ -2700,6 +2713,17 @@ IdleTimeBlockHandler(pointer pCounter, struct timeval **wt, pointer LastSelectMa
}
static void
+IdleTimeCheckBrackets(SyncCounter *counter, XSyncValue idle, XSyncValue *less, XSyncValue *greater)
+{
+ if ((greater && XSyncValueGreaterOrEqual(idle, *greater)) ||
+ (less && XSyncValueLessOrEqual(idle, *less))) {
+ SyncChangeCounter(counter, idle);
+ }
+ else
+ SyncUpdateCounter(counter, idle);
+}
+
+static void
IdleTimeWakeupHandler(pointer pCounter, int rc, pointer LastSelectMask)
{
SyncCounter *counter = pCounter;
@@ -2713,10 +2737,24 @@ IdleTimeWakeupHandler(pointer pCounter, int rc, pointer LastSelectMask)
IdleTimeQueryValue(pCounter, &idle);
- if ((greater && XSyncValueGreaterOrEqual(idle, *greater)) ||
- (less && XSyncValueLessOrEqual(idle, *less))) {
- SyncChangeCounter(counter, idle);
+ /*
+ There is no guarantee for the WakeupHandler to be called within a specific
+ timeframe. Idletime may go to 0, but by the time we get here, it may be
+ non-zero and alarms for a pos. transition on 0 won't get triggered.
+ https://bugs.freedesktop.org/show_bug.cgi?id=70476
+ */
+ if (LastEventTimeWasReset(priv->deviceid)) {
+ LastEventTimeToggleResetFlag(priv->deviceid, FALSE);
+ if (!XSyncValueIsZero(idle)) {
+ XSyncValue zero;
+ XSyncIntsToValue(&zero, 0, 0);
+ IdleTimeCheckBrackets(counter, zero, less, greater);
+ less = priv->value_less;
+ greater = priv->value_greater;
+ }
}
+
+ IdleTimeCheckBrackets(counter, idle, less, greater);
}
static void
@@ -2734,6 +2772,9 @@ IdleTimeBracketValues(pointer pCounter, CARD64 * pbracket_less,
IdleTimeWakeupHandler, pCounter);
}
else if (!registered && (pbracket_less || pbracket_greater)) {
+ /* Reset flag must be zero so we don't force a idle timer reset on
+ the first wakeup */
+ LastEventTimeToggleResetAll(FALSE);
RegisterBlockAndWakeupHandlers(IdleTimeBlockHandler,
IdleTimeWakeupHandler, pCounter);
}
diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c
index 62a0727b0..ebef23344 100644
--- a/Xi/xiallowev.c
+++ b/Xi/xiallowev.c
@@ -81,7 +81,7 @@ ProcXIAllowEvents(ClientPtr client)
have_xi22 = TRUE;
}
else {
- REQUEST_SIZE_MATCH(xXIAllowEventsReq);
+ REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq);
}
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
diff --git a/configure.ac b/configure.ac
index 1cd41c97d..539b4187c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,9 +26,9 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.14.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2013-09-12"
-RELEASE_NAME="September Rain"
+AC_INIT([xorg-server], 1.14.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2013-10-31"
+RELEASE_NAME="October Flood"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
@@ -225,7 +225,7 @@ AC_SUBST(DLOPEN_LIBS)
dnl Checks for library functions.
AC_CHECK_FUNCS([backtrace ffs geteuid getuid issetugid getresuid \
getdtablesize getifaddrs getpeereid getpeerucred getzoneid \
- mmap shmctl64 strncasecmp vasprintf vsnprintf walkcontext])
+ mmap seteuid shmctl64 strncasecmp vasprintf vsnprintf walkcontext])
AC_REPLACE_FUNCS([strcasecmp strcasestr strlcat strlcpy strndup])
dnl Find the math libary, then check for cbrt function in it.
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index feb765d1c..2e34d370f 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1425,6 +1425,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
GC *pGC;
unsigned char *data;
ITclosurePtr new_closure;
+ ITclosurePtr old_closure;
/* We're putting the client to sleep. We need to
save some state. Similar problem to that handled
@@ -1436,12 +1437,14 @@ doImageText(ClientPtr client, ITclosurePtr c)
err = BadAlloc;
goto bail;
}
+ old_closure = c;
*new_closure = *c;
c = new_closure;
data = malloc(c->nChars * itemSize);
if (!data) {
free(c);
+ c = old_closure;
err = BadAlloc;
goto bail;
}
@@ -1452,6 +1455,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
if (!pGC) {
free(c->data);
free(c);
+ c = old_closure;
err = BadAlloc;
goto bail;
}
@@ -1464,6 +1468,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
FreeScratchGC(pGC);
free(c->data);
free(c);
+ c = old_closure;
err = BadAlloc;
goto bail;
}
diff --git a/dix/events.c b/dix/events.c
index c079f9756..e3c0edfc9 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -262,6 +262,11 @@ InputInfo inputInfo;
EventSyncInfoRec syncEvents;
+static struct DeviceEventTime {
+ Bool reset;
+ TimeStamp time;
+} lastDeviceEventTime[MAXDEVICES];
+
/**
* The root window the given device is currently on.
*/
@@ -1043,33 +1048,73 @@ XineramaGetCursorScreen(DeviceIntPtr pDev)
#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */
static void
-MonthChangedOrBadTime(InternalEvent *ev)
+MonthChangedOrBadTime(CARD32 *ms)
{
/* If the ddx/OS is careless about not processing timestamped events from
* different sources in sorted order, then it's possible for time to go
* backwards when it should not. Here we ensure a decent time.
*/
- if ((currentTime.milliseconds - ev->any.time) > TIMESLOP)
+ if ((currentTime.milliseconds - *ms) > TIMESLOP)
currentTime.months++;
else
- ev->any.time = currentTime.milliseconds;
+ *ms = currentTime.milliseconds;
+}
+
+void
+NoticeTime(const DeviceIntPtr dev, TimeStamp time)
+{
+ lastDeviceEventTime[XIAllDevices].time = currentTime;
+ lastDeviceEventTime[dev->id].time = currentTime;
+
+ LastEventTimeToggleResetFlag(dev->id, TRUE);
+ LastEventTimeToggleResetFlag(XIAllDevices, TRUE);
}
static void
-NoticeTime(InternalEvent *ev, DeviceIntPtr dev)
+NoticeTimeMillis(const DeviceIntPtr dev, CARD32 *ms)
{
- if (ev->any.time < currentTime.milliseconds)
- MonthChangedOrBadTime(ev);
- currentTime.milliseconds = ev->any.time;
- lastDeviceEventTime[XIAllDevices] = currentTime;
- lastDeviceEventTime[dev->id] = currentTime;
+ TimeStamp time;
+ if (*ms < currentTime.milliseconds)
+ MonthChangedOrBadTime(ms);
+ time.months = currentTime.months;
+ time.milliseconds = *ms;
+ NoticeTime(dev, time);
}
void
NoticeEventTime(InternalEvent *ev, DeviceIntPtr dev)
{
if (!syncEvents.playingEvents)
- NoticeTime(ev, dev);
+ NoticeTimeMillis(dev, &ev->any.time);
+}
+
+TimeStamp
+LastEventTime(int deviceid)
+{
+ return lastDeviceEventTime[deviceid].time;
+}
+
+Bool
+LastEventTimeWasReset(int deviceid)
+{
+ return lastDeviceEventTime[deviceid].reset;
+}
+
+void
+LastEventTimeToggleResetFlag(int deviceid, Bool state)
+{
+ lastDeviceEventTime[deviceid].reset = state;
+}
+
+void
+LastEventTimeToggleResetAll(Bool state)
+{
+ DeviceIntPtr dev;
+ nt_list_for_each_entry(dev, inputInfo.devices, next) {
+ LastEventTimeToggleResetFlag(dev->id, FALSE);
+ }
+ LastEventTimeToggleResetFlag(XIAllDevices, FALSE);
+ LastEventTimeToggleResetFlag(XIAllMasterDevices, FALSE);
}
/**************************************************************************
@@ -1093,7 +1138,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
if (!xorg_list_is_empty(&syncEvents.pending))
tail = xorg_list_last_entry(&syncEvents.pending, QdEventRec, next);
- NoticeTime((InternalEvent *)event, device);
+ NoticeTimeMillis(device, &ev->any.time);
/* Fix for key repeating bug. */
if (device->key != NULL && device->key->xkbInfo != NULL &&
@@ -2102,6 +2147,7 @@ DeliverEventToInputClients(DeviceIntPtr dev, InputClients * inputclients,
{
int attempt;
enum EventDeliveryState rc = EVENT_NOT_DELIVERED;
+ Bool have_device_button_grab_class_client = FALSE;
for (; inputclients; inputclients = inputclients->next) {
Mask mask;
@@ -2121,13 +2167,21 @@ DeliverEventToInputClients(DeviceIntPtr dev, InputClients * inputclients,
events, count,
mask, filter, grab))) {
if (attempt > 0) {
- rc = EVENT_DELIVERED;
- *client_return = client;
- *mask_return = mask;
- /* Success overrides non-success, so if we've been
- * successful on one client, return that */
- }
- else if (rc == EVENT_NOT_DELIVERED)
+ /*
+ * The order of clients is arbitrary therefore if one
+ * client belongs to DeviceButtonGrabClass make sure to
+ * catch it.
+ */
+ if (!have_device_button_grab_class_client) {
+ rc = EVENT_DELIVERED;
+ *client_return = client;
+ *mask_return = mask;
+ /* Success overrides non-success, so if we've been
+ * successful on one client, return that */
+ if (mask & DeviceButtonGrabMask)
+ have_device_button_grab_class_client = TRUE;
+ }
+ } else if (rc == EVENT_NOT_DELIVERED)
rc = EVENT_REJECTED;
}
}
@@ -4130,6 +4184,9 @@ DeliverOneGrabbedEvent(InternalEvent *event, DeviceIntPtr dev,
GrabPtr grab = grabinfo->grab;
Mask filter;
+ if (grab->grabtype != level)
+ return 0;
+
switch (level) {
case XI2:
rc = EventToXI2(event, &xE);
@@ -4241,22 +4298,17 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
sendCore = (IsMaster(thisDev) && thisDev->coreEvents);
/* try core event */
- if (sendCore && grab->grabtype == CORE) {
- deliveries = DeliverOneGrabbedEvent(event, thisDev, CORE);
- }
-
- if (!deliveries) {
- deliveries = DeliverOneGrabbedEvent(event, thisDev, XI2);
- }
-
- if (!deliveries) {
- deliveries = DeliverOneGrabbedEvent(event, thisDev, XI);
- }
+ if ((sendCore && grab->grabtype == CORE) || grab->grabtype != CORE)
+ deliveries = DeliverOneGrabbedEvent(event, thisDev, grab->grabtype);
if (deliveries && (event->any.type == ET_Motion))
thisDev->valuator->motionHintWindow = grab->window;
}
- if (deliveries && !deactivateGrab && event->any.type != ET_Motion) {
+ if (deliveries && !deactivateGrab &&
+ (event->any.type == ET_KeyPress ||
+ event->any.type == ET_KeyRelease ||
+ event->any.type == ET_ButtonPress ||
+ event->any.type == ET_ButtonRelease)) {
switch (grabinfo->sync.state) {
case FREEZE_BOTH_NEXT_EVENT:
dev = GetPairedDevice(thisDev);
@@ -4641,7 +4693,7 @@ DeviceEnterLeaveEvent(DeviceIntPtr mouse,
filter = GetEventFilter(mouse, (xEvent *) event);
- if (grab) {
+ if (grab && grab->type == XI2) {
Mask mask;
mask = xi2mask_isset(grab->xi2mask, mouse, type);
@@ -5266,8 +5318,12 @@ InitEvents(void)
inputInfo.pointer = (DeviceIntPtr) NULL;
for (i = 0; i < MAXDEVICES; i++) {
+ DeviceIntRec dummy;
memcpy(&event_filters[i], default_filter, sizeof(default_filter));
- lastDeviceEventTime[i] = currentTime;
+
+ dummy.id = i;
+ NoticeTime(&dummy, currentTime);
+ LastEventTimeToggleResetFlag(i, FALSE);
}
syncEvents.replayDev = (DeviceIntPtr) NULL;
diff --git a/dix/globals.c b/dix/globals.c
index 82d0e5977..1cc622bba 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -122,7 +122,6 @@ Bool party_like_its_1989 = FALSE;
Bool whiteRoot = FALSE;
TimeStamp currentTime;
-TimeStamp lastDeviceEventTime[MAXDEVICES];
int defaultColorVisualClass = -1;
int monitorResolution = 0;
diff --git a/dix/window.c b/dix/window.c
index 7738aa145..cb81a953a 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -125,6 +125,7 @@ Equipment Corporation.
#ifdef COMPOSITE
#include "compint.h"
#endif
+#include "selection.h"
#include "privates.h"
#include "xace.h"
@@ -3091,9 +3092,7 @@ dixSaveScreens(ClientPtr client, int on, int mode)
DeviceIntPtr dev;
UpdateCurrentTimeIf();
nt_list_for_each_entry(dev, inputInfo.devices, next)
- lastDeviceEventTime[dev->id] = currentTime;
- lastDeviceEventTime[XIAllDevices] = currentTime;
- lastDeviceEventTime[XIAllMasterDevices] = currentTime;
+ NoticeTime(dev, currentTime);
}
SetScreenSaverTimer();
}
diff --git a/hw/xfree86/parser/write.c b/hw/xfree86/parser/write.c
index d74628ab7..26739b933 100644
--- a/hw/xfree86/parser/write.c
+++ b/hw/xfree86/parser/write.c
@@ -66,7 +66,7 @@
#include <signal.h>
#include <errno.h>
-#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
+#if defined(HAVE_SETEUID) && defined(_POSIX_SAVED_IDS) && _POSIX_SAVED_IDS > 0
#define HAS_SAVED_IDS_AND_SETEUID
#endif
#if defined(WIN32)
diff --git a/include/dix.h b/include/dix.h
index 171e56e11..fa7ccd4a3 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -315,8 +315,19 @@ extern _X_EXPORT WindowPtr
GetSpriteWindow(DeviceIntPtr pDev);
extern _X_EXPORT void
+NoticeTime(const DeviceIntPtr dev,
+ TimeStamp time);
+extern _X_EXPORT void
NoticeEventTime(InternalEvent *ev,
DeviceIntPtr dev);
+extern _X_EXPORT TimeStamp
+LastEventTime(int deviceid);
+extern _X_EXPORT Bool
+LastEventTimeWasReset(int deviceid);
+extern _X_EXPORT void
+LastEventTimeToggleResetFlag(int deviceid, Bool state);
+extern _X_EXPORT void
+LastEventTimeToggleResetAll(Bool state);
extern void
EnqueueEvent(InternalEvent * /* ev */ ,
diff --git a/include/dixstruct.h b/include/dixstruct.h
index aef822ca2..492f96047 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -155,7 +155,6 @@ typedef struct _WorkQueue {
} WorkQueueRec;
extern _X_EXPORT TimeStamp currentTime;
-extern _X_EXPORT TimeStamp lastDeviceEventTime[MAXDEVICES];
extern _X_EXPORT int
CompareTimeStamps(TimeStamp /*a */ ,
diff --git a/include/input.h b/include/input.h
index 7eed60bcf..bff7ffe22 100644
--- a/include/input.h
+++ b/include/input.h
@@ -113,9 +113,9 @@ SOFTWARE.
#endif
enum InputLevel {
- CORE,
- XI,
- XI2,
+ CORE = 1,
+ XI = 2,
+ XI2 = 3,
};
typedef unsigned long Leds;
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index a71b25d72..0df31aeb2 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -139,4 +139,7 @@
/* Have X server platform bus support */
#undef XSERVER_PLATFORM_BUS
+/* Define to 1 if you have the `seteuid' function. */
+#undef HAVE_SETEUID
+
#endif /* _XORG_CONFIG_H_ */
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 81c663abe..dbca9f774 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -157,7 +157,7 @@ static ExtensionToggle ExtensionToggleList[] = {
#ifdef XF86BIGFONT
{"XFree86-Bigfont", &noXFree86BigfontExtension},
#endif
-#ifdef XorgLoader
+#ifdef XORGSERVER
#ifdef XFreeXDGA
{"XFree86-DGA", &noXFree86DGAExtension},
#endif
diff --git a/os/WaitFor.c b/os/WaitFor.c
index 393890f19..c5f4cd78b 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -561,7 +561,7 @@ NextDPMSTimeout(INT32 timeout)
static CARD32
ScreenSaverTimeoutExpire(OsTimerPtr timer, CARD32 now, pointer arg)
{
- INT32 timeout = now - lastDeviceEventTime[XIAllDevices].milliseconds;
+ INT32 timeout = now - LastEventTime(XIAllDevices).milliseconds;
CARD32 nextTimeout = 0;
#ifdef DPMSExtension
diff --git a/os/xdmcp.c b/os/xdmcp.c
index 0538ac53e..11f11333d 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -1391,7 +1391,7 @@ recv_alive_msg(unsigned length)
if (SessionRunning && AliveSessionID == SessionID) {
/* backoff dormancy period */
state = XDM_RUN_SESSION;
- if ((GetTimeInMillis() - lastDeviceEventTime[XIAllDevices].milliseconds) >
+ if ((GetTimeInMillis() - LastEventTime(XIAllDevices).milliseconds) >
keepaliveDormancy * 1000) {
keepaliveDormancy <<= 1;
if (keepaliveDormancy > XDM_MAX_DORMANCY)
diff --git a/test/hashtabletest.c b/test/hashtabletest.c
index 64c7091fc..6af14a8e6 100644
--- a/test/hashtabletest.c
+++ b/test/hashtabletest.c
@@ -1,3 +1,7 @@
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#include <misc.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/test/signal-logging.c b/test/signal-logging.c
index f6bc85ce8..a03c5acbe 100644
--- a/test/signal-logging.c
+++ b/test/signal-logging.c
@@ -150,6 +150,7 @@ number_formatting(void)
assert(check_float_format_test(float_tests[i]));
}
+#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-security"
static void logging_format(void)
{
@@ -378,7 +379,7 @@ static void logging_format(void)
#undef read_log_msg
}
-#pragma GCC diagnostic pop "-Wformat-security"
+#pragma GCC diagnostic pop /* "-Wformat-security" */
int
main(int argc, char **argv)