summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--dix/dispatch.c7
-rw-r--r--include/dix.h6
-rw-r--r--os/WaitFor.c2
4 files changed, 11 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index c09b8543f..922ee0cc5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -812,7 +812,7 @@ APPLEWMPROTO="applewmproto >= 1.4"
LIBXSHMFENCE="xshmfence >= 1.1"
dnl Required modules
-XPROTO="xproto >= 7.0.28"
+XPROTO="xproto >= 7.0.30"
RANDRPROTO="randrproto >= 1.5.0"
RENDERPROTO="renderproto >= 0.11"
XEXTPROTO="xextproto >= 7.2.99.901"
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 26a461b0d..adcc9cffd 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -195,7 +195,7 @@ UpdateCurrentTime(void)
systime.milliseconds = GetTimeInMillis();
if (systime.milliseconds < currentTime.milliseconds)
systime.months++;
- if (*checkForInput[0] != *checkForInput[1])
+ if (InputCheckPending())
ProcessInputEvents();
if (CompareTimeStamps(systime, currentTime) == LATER)
currentTime = systime;
@@ -395,7 +395,6 @@ Dispatch(void)
{
int result;
ClientPtr client;
- HWEventQueuePtr *icheck = checkForInput;
long start_tick;
nextFreeClientID = 1;
@@ -405,7 +404,7 @@ Dispatch(void)
init_client_ready();
while (!dispatchException) {
- if (*icheck[0] != *icheck[1]) {
+ if (InputCheckPending()) {
ProcessInputEvents();
FlushIfCriticalOutputPending();
}
@@ -425,7 +424,7 @@ Dispatch(void)
start_tick = SmartScheduleTime;
while (!isItTimeToYield) {
- if (*icheck[0] != *icheck[1])
+ if (InputCheckPending())
ProcessInputEvents();
FlushIfCriticalOutputPending();
diff --git a/include/dix.h b/include/dix.h
index ae9719ae9..240018b8d 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -136,6 +136,12 @@ typedef HWEventQueueType *HWEventQueuePtr;
extern _X_EXPORT HWEventQueuePtr checkForInput[2];
+static inline _X_NOTSAN Bool
+InputCheckPending(void)
+{
+ return (*checkForInput[0] != *checkForInput[1]);
+}
+
typedef struct _TimeStamp {
CARD32 months; /* really ~49.7 days */
CARD32 milliseconds;
diff --git a/os/WaitFor.c b/os/WaitFor.c
index 024df3521..7d5aa32c8 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -234,7 +234,7 @@ WaitForSomething(Bool are_ready)
} else
are_ready = clients_are_ready();
- if (*checkForInput[0] != *checkForInput[1])
+ if (InputCheckPending())
return FALSE;
if (are_ready) {