summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xserver/ChangeLog410
-rw-r--r--xserver/Xext/saver.c6
-rw-r--r--xserver/Xext/sync.c121
-rw-r--r--xserver/Xi/xiallowev.c2
-rw-r--r--xserver/configure26
-rw-r--r--xserver/configure.ac8
-rw-r--r--xserver/dix/events.c120
-rw-r--r--xserver/dix/globals.c1
-rw-r--r--xserver/dix/window.c5
-rw-r--r--xserver/hw/xfree86/parser/write.c3
-rw-r--r--xserver/include/dix.h11
-rw-r--r--xserver/include/dixstruct.h1
-rw-r--r--xserver/include/do-not-use-config.h.in3
-rw-r--r--xserver/include/input.h6
-rw-r--r--xserver/include/xorg-config.h.in3
-rw-r--r--xserver/mi/miinitext.c2
-rw-r--r--xserver/os/WaitFor.c2
-rw-r--r--xserver/os/xdmcp.c2
-rw-r--r--xserver/test/hashtabletest.c4
-rw-r--r--xserver/test/signal-logging.c3
20 files changed, 632 insertions, 107 deletions
diff --git a/xserver/ChangeLog b/xserver/ChangeLog
index fc7ffc72f..0ad7f7215 100644
--- a/xserver/ChangeLog
+++ b/xserver/ChangeLog
@@ -1,3 +1,413 @@
+commit 4c40d9c4e4e4b39e81097cf6152d9940422fb5ab
+Author: Matt Dew <marcoz@osource.org>
+Date: Thu Oct 31 23:09:03 2013 -0600
+
+ bump version from 1.14.3.901, to 1.14.4
+
+commit ca11bdc890f14fbe2ab4c32fb7a36ae50672b81a
+Author: Matt Dew <marcoz@osource.org>
+Date: Sat Oct 26 13:51:05 2013 -0600
+
+ Bump version from 1.14.3 to 1.14.3.901.
+
+commit 07069f5d71dd0869fe9a6f9ab87c467e7ec75011
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Oct 17 12:02:27 2013 +1000
+
+ sync: split updating and triggering a counter up
+
+ Now that the brackets are always the nearest change points (regardless of
+ transition) we need to update the counters whenever we check for any updates.
+
+ Otherwise we end up with a situation where counter->value is out of date and
+ an alarm doesn't trigger because we're still using the value from last time
+ something actually triggered.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+ Reviewed-by: Keith Packard <keithp@keithp.com>
+ (cherry picked from commit 2523a445a09a75a8baf642608d099a5e12d5437f)
+
+commit fa5e4dcfb6236b8be0bf57edd1ff4f59cb2f8f6b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed Oct 16 16:31:15 2013 +1000
+
+ sync: always set the brackets (#59644)
+
+ The current code sets bracket_greater to the first trigger after the current
+ value, and bracket_less to the last trigger before the current value.
+
+ For example, the idle timer with three negative and three positive transitions
+ would set this:
+
+ nt1 nt2 nt3
+ |--------|------|--|------- idle --|---|--|-----> t
+ pt1 pt2 pt3
+ bracket_less == nt2
+ bracket_greater == pt2
+
+ This is an optimization so we can skip code paths in the block/wakeup handlers
+ if the current value doesn't meet any of the trigger requirements. Those
+ handlers largely do a
+ if (bracket_less is less than current value &&
+ bracket_greater is greater than current value)
+ return, nothing to do
+
+ However, unless the bracket values are updated at the correct time, the
+ following may happen:
+
+ nt
+ |--------------|---------- idle ------|--------> t
+ pt
+
+ In this case, neither bracket is set, we're past the pos transition and not
+ yet at the neg transition. idle may now go past nt, but the brackets are not
+ updated. If idle is then reset to 0, no alarm is triggered for nt. Likewise,
+ idle may now go past pt and no alarm is triggered.
+
+ Changing an alarm or triggering an alarm will re-calculate the brackets, so
+ this bug is somewhat random. If any other client triggers an alarm when the
+ brackets are wrongly NULL, the recalculation will set them this bug may not
+ appear.
+
+ This patch changes the behavior, so that the brackets are always the nearest
+ positive or negative transitions to the current counter value. In the example
+ above, nt will trigger a wakeup and a re-calculation of the brackets, so that
+ going past it in the negative direction will then cause the proper alarm
+ triggers.
+
+ Or, in Keith's words:
+
+ Timer currently past a positive trigger
+ No bracket values, because no trigger in range
+
+ Timer moves backwards before the positive trigger
+ Brackets not reset, even though there is now a trigger in range
+
+ Timer moves forward past the positive trigger
+ Trigger doesn't fire because brackets not set
+
+ Setting the LT bracket in this case will cause everything to get
+ re-evaluated when the sync value moves backwards before the trigger
+ value.
+
+ X.Org Bug 59644 <http://bugs.freedesktop.org/show_bug.cgi?id=59644>
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+ Reviewed-by: Keith Packard <keithp@keithp.com>
+ (cherry picked from commit e57ec99b03b2ad840c384a97ab2766ce9da0f5cc)
+
+commit 7b7753e97f0dfadfdcf28ce18b17a759b57f6be1
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed Oct 16 10:08:46 2013 +1000
+
+ sync: if the idle time was reset, force alarms to trigger (#70476)
+
+ The time between the idle reset and the IdleTimeWakeupHandler to be called is
+ indeterminate. Clients with an PositiveTransition or NegativeTransition alarm
+ on a low threshold may miss an alarm.
+
+ Work around this by keeping a reset flag for each device. When the
+ WakeupHandler triggers and the reset flag is set, we force a re-calculation of
+ everything and pretend the current idle time is zero. Immediately after is the
+ next calculation with the real idle time.
+
+ Relatively reproducible test case: Set up a XSyncNegativeTransition alarm for
+ a threshold of 1 ms. May trigger, may not.
+
+ X.Org Bug 70476 <http://bugs.freedesktop.org/show_bug.cgi?id=70476>
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+ Reviewed-by: Keith Packard <keithp@keithp.com>
+ (cherry picked from commit 06b87aa528d7a739ba20101a1f83b1a428691a01)
+
+commit 3866624a45074ba37a2e605d00df602c0222cd85
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed Oct 16 09:36:01 2013 +1000
+
+ dix: provide accessor methods for the last device event time
+
+ And now that we have the accessors, localize it. No functional changes, just
+ preparing for a future change.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+ Reviewed-by: Keith Packard <keithp@keithp.com>
+ (cherry picked from commit efc1035ca958f2c9d266338a308518a0834b1773)
+
+commit 47e30b3649fc15efbc8cf06c604254d84652ede0
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed Oct 16 09:21:47 2013 +1000
+
+ sync: supply the counter from IdleTimeBlockHandler
+
+ The main idletime counter has an initialized deviceid, might as well be
+ supplying it properly. Without this, we'd only ever check the XIAllDevices
+ counter, so the wait would never be adjusted for the device-specific triggers.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+ Reviewed-by: Keith Packard <keithp@keithp.com>
+ (cherry picked from commit b7c9bd9cf276e92a73be57ff2ed32b47a80f13fb)
+
+commit b47c02f21660bd99a5af5aa374294a22813d6679
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed Oct 16 13:01:01 2013 +1000
+
+ sync: always call BracketValues when recalculating upper/lower brackets
+
+ Both ServertimeBracketValues and IdleTimeBracketValues copy the value into
+ there SysCounter privates. Call it for a NULL set as well, so we don't end up
+ with stale pointers and we can remove the block/wakeup handlers.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+ Reviewed-by: Keith Packard <keithp@keithp.com>
+ (cherry picked from commit 2efe49c1029f959fe80879bcf50df42e8b80451d)
+
+commit 0033e969f4de84aa08ae321bc268a1461e12824b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Oct 15 10:11:20 2013 +1000
+
+ sync: compress two if statements
+
+ No functional changes, just merges a > and == condition into a >= condition.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+ Reviewed-by: Keith Packard <keithp@keithp.com>
+ (cherry picked from commit 5c7cfd4c6978834551848e1be62af240102e39b5)
+
+commit 0c809f459c9997f743961081bc089fd2999fdcdb
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed Sep 4 15:34:29 2013 +1000
+
+ dix: only deliver for the current grab type
+
+ Use the grabtype to determine which type of event to send - all other events
+ are pointless and may result in erroneous events being delivered.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit 7cf1b595c8c8f9776a39559d2878cf90af3f2859)
+
+commit acb447ef69bdfcae4fe7de4eef880c3bae0f7d4c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed Sep 4 15:34:28 2013 +1000
+
+ dix: don't attempt to deliver an event for a different grabtype
+
+ For an active grab, grab->eventMask can be either the core or the XI1 mask.
+ With the overlap of event filters, calling DeliverOneGrabbedEvent(XI1) for a
+ ProximityOut event will trigger if the client has selected for enter events -
+ the filter is the same for both.
+
+ Thus, we end up delivering a proximity event to a client not expecting one.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit 78944d62ffc7fec6f75b6f514ab7a139ba9bc77b)
+
+commit f5b22ee8ba829aa095df3d091ec0a74e0aa42778
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed Sep 4 15:34:27 2013 +1000
+
+ include: change grabtypes to start at 1
+
+ Avoid erroneous detection of an unset grabtype as CORE
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit 6159811a1aaf848016dbfa7bde68df097027870c)
+
+commit d409cc884c53e7f66ee9266c85cdb7c100365c8f
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed Sep 4 15:34:26 2013 +1000
+
+ dix: only allow button and key events to freeze a sync'd pointer
+
+ If a client calls XAllowEvents(SyncPointer) it expects events as normal until
+ the next button press or release event - that freezes the device. An e.g.
+ proximity event must thus not freeze the pointer.
+
+ As per the spec, only button and key events may do so, so narrow it to these
+ cases.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit be6ea80b79b3d6eb97106ea142e01acbdf059995)
+
+commit 551dbf744b38a3da3d39b9154cb30d1197297eb1
+Author: Egbert Eich <eich@freedesktop.org>
+Date: Fri Aug 16 19:52:16 2013 +0200
+
+ DIX/Xi: Pass correct client to CheckDeviceGrabAndHintWindow()
+
+ If we have a client which has registered for a DeviceButton grab
+ be sure to pass this to CheckDeviceGrabAndHintWindow(). Since the
+ order of clients is arbitrary there is no guarantee that the last
+ client in the list is the one that belongs to this class.
+
+ Signed-off-by: Egbert Eich <eich@freedesktop.org>
+ Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit 05ea6307fa4f0bee3d3bf536396059f3906791a0)
+
+commit cc7084af0d61e88ec0a62e14d6eef10c0b2b8b38
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon Aug 26 15:51:46 2013 +1000
+
+ Xi: allow for XIAllowEvent requests larger than XI < 2.2 size (#68554)
+
+ XIAllowEvents changed length in XI 2.2 (for the touchid). A bug in libXi
+ causes libXi to always use the new request length if the server supports
+ 2.2, regardless of the client's XIQueryVersion request.
+
+ The server takes the client's XIQueryVersion request into account though,
+ resulting in a BadLength error if a 2.[0,1] client calls XIAllowEvents on a
+ XI 2.2+ server.
+
+ Can't fix this in libXi, so work around this in the server.
+
+ X.Org Bug 68554 <http://bugs.freedesktop.org/show_bug.cgi?id=68554>
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+ (cherry picked from commit 94d4e29aedc69431fa9b299ca1b67947173d7a24)
+
+commit 2ac257d845e7f52975123741292056b3df02f908
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri Aug 16 15:30:59 2013 +1000
+
+ dix: check for grab type before checking XI2 mask
+
+ if the grab type isn't XI2, grab->xi2mask is random. That random data may
+ have the enter/leave mask set, leading to events sent to the client that the
+ client can't handler.
+
+ Source of these errors:
+ _xgeWireToEvent: Unknown extension 131, this should never happen.
+
+ Simplest reproducer:
+ Start Xephyr, press button inside window, move out. As the pointer leaves
+ the Xephyr window, the errors appear.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+ (cherry picked from commit 82939e02392cbb880313fe92957091ff89ce2f2b)
+
+commit 3ac50dca8b4b9b6b3a7e16c5855ca246a70c9232
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri Aug 23 09:04:01 2013 +1000
+
+ test: fix the gcc diagnostics pragma
+
+ pop without push restores the commandline options. The proper way is to
+ push, then ignore, then pop.
+
+ And while we're at it, change the pop argument to a comment - pop ignores
+ the argument, but be proper about it.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit d803f296c616ccf55711cf0af9e7d3eae2edda16)
+
+commit ec6de521161d5c45885c8751c250d3fabcbc2194
+Merge: 1427621 a1985e8
+Author: Matt Dew <marcoz@osource.org>
+Date: Mon Oct 21 21:03:29 2013 -0600
+
+ Merge commit 'a1985e892f5b5f0959235a631d8bcf676b78bfbc' into server-1.14-branch
+
+commit 14276213ac4d59316d5745ccb9a2fb23eb10cf99
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon Aug 5 20:46:45 2013 -0700
+
+ Allow disabling XFree86-DGA, DRI, VidModeExtension extensions
+
+ Code to recognize these in extension enable/disable options was wrapped
+ in #ifdef XorgLoader, but that's not defined when building miinitext.c
+ since the great module merge of 1.13. Change to an #ifdef that is defined.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Robert Hooker <robert.hooker@canonical.com>
+ Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 296057914570bd319bce9b718e6b90f46e6cc661
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon Sep 16 21:47:16 2013 -0700
+
+ Avoid use-after-free in dix/dixfonts.c: doImageText() [CVE-2013-4396]
+
+ Save a pointer to the passed in closure structure before copying it
+ and overwriting the *c pointer to point to our copy instead of the
+ original. If we hit an error, once we free(c), reset c to point to
+ the original structure before jumping to the cleanup code that
+ references *c.
+
+ Since one of the errors being checked for is whether the server was
+ able to malloc(c->nChars * itemSize), the client can potentially pass
+ a number of characters chosen to cause the malloc to fail and the
+ error path to be taken, resulting in the read from freed memory.
+
+ Since the memory is accessed almost immediately afterwards, and the
+ X server is mostly single threaded, the odds of the free memory having
+ invalid contents are low with most malloc implementations when not using
+ memory debugging features, but some allocators will definitely overwrite
+ the memory there, leading to a likely crash.
+
+ Reported-by: Pedro Ribeiro <pedrib@gmail.com>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit a1985e892f5b5f0959235a631d8bcf676b78bfbc
+Author: Julien Cristau <jcristau@debian.org>
+Date: Sat Jul 27 12:09:07 2013 +0200
+
+ dix: add missing include for DeleteWindowFromAnySelections
+
+ Fixes build error with XACE disabled:
+ window.c:886:5: error: implicit declaration of function 'DeleteWindowFromAnySelections' [-Werror=implicit-function-declaration]
+ DeleteWindowFromAnySelections(pWin);
+ ^
+
+ Debian bug#701372
+
+ Reported-by: Matthias Klose <doko@debian.org>
+ Signed-off-by: Julien Cristau <jcristau@debian.org>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+ (cherry picked from commit fe7463b8ce0de301c2f82b108c93963424f77219)
+
+commit 19c2d516c2b5182e8b45649485aa3123b229b66a
+Author: Julien Cristau <jcristau@debian.org>
+Date: Fri Aug 2 20:07:36 2013 +0200
+
+ xfree86: improve check for posix saved ids
+
+ Replace hardcoded SVR4 || linux || CSRG_BASED with an autoconf check and
+ the _POSIX_SAVED_IDS macro.
+
+ Suggested-by: Mark Kettenis <mark.kettenis@xs4all.nl>
+ Signed-off-by: Julien Cristau <jcristau@debian.org>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Mark Kettenis <kettenis@openbsd.org>.
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit c218ba8423a73a7a643cb17789db8a1dd0901ca6)
+
+commit b39a6ab645815a6012d9b2feaa049336ea09aa76
+Author: Julien Cristau <jcristau@debian.org>
+Date: Fri Aug 2 23:46:00 2013 +0200
+
+ test: include dix-config.h in hashtabletest.c
+
+ Missing _XSERVER64 define caused inconsistent sizeof(XID) between the
+ test and hashtable code, leading to test failures on 64bit big endian
+ archs like s390x or ppc64.
+
+ Signed-off-by: Julien Cristau <jcristau@debian.org>
+ Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit 930c6ff15d437dfb0f897e8cb4253abba70819cc)
+
commit 9acb64f54ee9dd2fe41afda159b919280850ad8e
Author: Matt Dew <marcoz@osource.org>
Date: Thu Sep 12 21:17:40 2013 -0600
diff --git a/xserver/Xext/saver.c b/xserver/Xext/saver.c
index fe81bc4d7..e06f40837 100644
--- a/xserver/Xext/saver.c
+++ b/xserver/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/xserver/Xext/sync.c b/xserver/Xext/sync.c
index 4d11992bb..9b4d0a474 100644
--- a/xserver/Xext/sync.c
+++ b/xserver/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/xserver/Xi/xiallowev.c b/xserver/Xi/xiallowev.c
index 62a0727b0..ebef23344 100644
--- a/xserver/Xi/xiallowev.c
+++ b/xserver/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/xserver/configure b/xserver/configure
index 98dfdfd7f..7dce172ec 100644
--- a/xserver/configure
+++ b/xserver/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xorg-server 1.14.3.
+# Generated by GNU Autoconf 2.69 for xorg-server 1.14.4.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -651,8 +651,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xorg-server'
PACKAGE_TARNAME='xorg-server'
-PACKAGE_VERSION='1.14.3'
-PACKAGE_STRING='xorg-server 1.14.3'
+PACKAGE_VERSION='1.14.4'
+PACKAGE_STRING='xorg-server 1.14.4'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
@@ -1992,7 +1992,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xorg-server 1.14.3 to adapt to many kinds of systems.
+\`configure' configures xorg-server 1.14.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -2062,7 +2062,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xorg-server 1.14.3:";;
+ short | recursive ) echo "Configuration of xorg-server 1.14.4:";;
esac
cat <<\_ACEOF
@@ -2463,7 +2463,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xorg-server configure 1.14.3
+xorg-server configure 1.14.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -3172,7 +3172,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xorg-server $as_me 1.14.3, which was
+It was created by xorg-server $as_me 1.14.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3520,8 +3520,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-RELEASE_DATE="2013-09-12"
-RELEASE_NAME="September Rain"
+RELEASE_DATE="2013-10-31"
+RELEASE_NAME="October Flood"
am__api_version='1.12'
@@ -3999,7 +3999,7 @@ fi
# Define the identity of the package.
PACKAGE='xorg-server'
- VERSION='1.14.3'
+ VERSION='1.14.4'
cat >>confdefs.h <<_ACEOF
@@ -21710,7 +21710,7 @@ fi
for ac_func in backtrace ffs geteuid getuid issetugid getresuid \
getdtablesize getifaddrs getpeereid getpeerucred getzoneid \
- mmap shmctl64 strncasecmp vasprintf vsnprintf walkcontext
+ mmap seteuid shmctl64 strncasecmp vasprintf vsnprintf walkcontext
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -31181,7 +31181,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xorg-server $as_me 1.14.3, which was
+This file was extended by xorg-server $as_me 1.14.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -31247,7 +31247,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-xorg-server config.status 1.14.3
+xorg-server config.status 1.14.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/xserver/configure.ac b/xserver/configure.ac
index e336f9846..93de44e50 100644
--- a/xserver/configure.ac
+++ b/xserver/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])
@@ -215,7 +215,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/xserver/dix/events.c b/xserver/dix/events.c
index c079f9756..e3c0edfc9 100644
--- a/xserver/dix/events.c
+++ b/xserver/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/xserver/dix/globals.c b/xserver/dix/globals.c
index ee7379226..f0e6f21b5 100644
--- a/xserver/dix/globals.c
+++ b/xserver/dix/globals.c
@@ -126,7 +126,6 @@ Bool party_like_its_1989 = TRUE;
Bool whiteRoot = FALSE;
TimeStamp currentTime;
-TimeStamp lastDeviceEventTime[MAXDEVICES];
int defaultColorVisualClass = -1;
int monitorResolution = 0;
diff --git a/xserver/dix/window.c b/xserver/dix/window.c
index 8e61779e7..19cfcd668 100644
--- a/xserver/dix/window.c
+++ b/xserver/dix/window.c
@@ -126,6 +126,7 @@ Equipment Corporation.
#ifdef COMPOSITE
#include "compint.h"
#endif
+#include "selection.h"
#include "privates.h"
#include "xace.h"
@@ -3092,9 +3093,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/xserver/hw/xfree86/parser/write.c b/xserver/hw/xfree86/parser/write.c
index 9c706a062..26739b933 100644
--- a/xserver/hw/xfree86/parser/write.c
+++ b/xserver/hw/xfree86/parser/write.c
@@ -55,6 +55,7 @@
#include <xorg-config.h>
#endif
+#include "os.h"
#include "xf86Parser.h"
#include "xf86tokens.h"
#include "Configint.h"
@@ -65,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/xserver/include/dix.h b/xserver/include/dix.h
index 171e56e11..fa7ccd4a3 100644
--- a/xserver/include/dix.h
+++ b/xserver/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/xserver/include/dixstruct.h b/xserver/include/dixstruct.h
index aef822ca2..492f96047 100644
--- a/xserver/include/dixstruct.h
+++ b/xserver/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/xserver/include/do-not-use-config.h.in b/xserver/include/do-not-use-config.h.in
index 0851744b4..799755c72 100644
--- a/xserver/include/do-not-use-config.h.in
+++ b/xserver/include/do-not-use-config.h.in
@@ -247,6 +247,9 @@
/* Define to 1 if you have the <rpcsvc/dbm.h> header file. */
#undef HAVE_RPCSVC_DBM_H
+/* Define to 1 if you have the `seteuid' function. */
+#undef HAVE_SETEUID
+
/* Use CommonCrypto SHA1 functions */
#undef HAVE_SHA1_IN_COMMONCRYPTO
diff --git a/xserver/include/input.h b/xserver/include/input.h
index 7eed60bcf..bff7ffe22 100644
--- a/xserver/include/input.h
+++ b/xserver/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/xserver/include/xorg-config.h.in b/xserver/include/xorg-config.h.in
index 5dee82519..2075cb5b1 100644
--- a/xserver/include/xorg-config.h.in
+++ b/xserver/include/xorg-config.h.in
@@ -139,6 +139,9 @@
/* Have X server platform bus support */
#undef XSERVER_PLATFORM_BUS
+/* Define to 1 if you have the `seteuid' function. */
+#undef HAVE_SETEUID
+
/* Use X server privilege separation */
#undef X_PRIVSEP
diff --git a/xserver/mi/miinitext.c b/xserver/mi/miinitext.c
index 81c663abe..dbca9f774 100644
--- a/xserver/mi/miinitext.c
+++ b/xserver/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/xserver/os/WaitFor.c b/xserver/os/WaitFor.c
index 393890f19..c5f4cd78b 100644
--- a/xserver/os/WaitFor.c
+++ b/xserver/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/xserver/os/xdmcp.c b/xserver/os/xdmcp.c
index 0538ac53e..11f11333d 100644
--- a/xserver/os/xdmcp.c
+++ b/xserver/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/xserver/test/hashtabletest.c b/xserver/test/hashtabletest.c
index 64c7091fc..6af14a8e6 100644
--- a/xserver/test/hashtabletest.c
+++ b/xserver/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/xserver/test/signal-logging.c b/xserver/test/signal-logging.c
index f6bc85ce8..a03c5acbe 100644
--- a/xserver/test/signal-logging.c
+++ b/xserver/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)