summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-09-19 00:21:44 -0700
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-09-22 14:55:02 -0700
commit7d6ebf3f4e4d517bb846d15a5deb131da19a267c (patch)
treeb9fcd39fc63c759671d2af105af1fbeb5a6eece5 /mi
parent8bc4727f475321a8adcbbd859f3f8dd9eeb64aa4 (diff)
XQuartz: Adopt input_lock() and input_unlock()
This allows us to remove darwinEvents_lock() and darwinEvents_unlock() and remove the serverRunning hack from dix Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Diffstat (limited to 'mi')
-rw-r--r--mi/mieq.c22
-rw-r--r--mi/mipointer.c12
2 files changed, 0 insertions, 34 deletions
diff --git a/mi/mieq.c b/mi/mieq.c
index e31e4f125..a6e867df6 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -87,24 +87,6 @@ typedef struct _EventQueue {
static EventQueueRec miEventQueue;
-#ifdef XQUARTZ
-extern BOOL serverRunning;
-extern pthread_mutex_t serverRunningMutex;
-extern pthread_cond_t serverRunningCond;
-
-static inline void
-wait_for_server_init(void)
-{
- /* If the server hasn't finished initializing, wait for it... */
- if (!serverRunning) {
- pthread_mutex_lock(&serverRunningMutex);
- while (!serverRunning)
- pthread_cond_wait(&serverRunningCond, &serverRunningMutex);
- pthread_mutex_unlock(&serverRunningMutex);
- }
-}
-#endif
-
static size_t
mieqNumEnqueued(EventQueuePtr eventQueue)
{
@@ -219,10 +201,6 @@ mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e)
Time time;
size_t n_enqueued;
-#ifdef XQUARTZ
- wait_for_server_init();
-#endif
-
verify_internal_event(e);
n_enqueued = mieqNumEnqueued(&miEventQueue);
diff --git a/mi/mipointer.c b/mi/mipointer.c
index 01f3bd2fe..75be1aeeb 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -709,12 +709,6 @@ miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y)
*y = MIPOINTER(pDev)->y;
}
-#ifdef XQUARTZ
-#include <pthread.h>
-void darwinEvents_lock(void);
-void darwinEvents_unlock(void);
-#endif
-
/**
* Move the device's pointer to the x/y coordinates on the given screen.
* This function generates and enqueues pointer events.
@@ -752,13 +746,7 @@ miPointerMove(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
POINTER_NORAW, &mask);
input_lock();
-#ifdef XQUARTZ
- darwinEvents_lock();
-#endif
for (i = 0; i < nevents; i++)
mieqEnqueue(pDev, &mipointermove_events[i]);
-#ifdef XQUARTZ
- darwinEvents_unlock();
-#endif
input_unlock();
}