aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/darwinEvents.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-05-16 09:49:27 +0000
committermarha <marha@users.sourceforge.net>2011-05-16 09:49:27 +0000
commitab5c2d2c78273ccdc7c9734bcba482a33fcf9652 (patch)
treed12aaeba9956621fe7429d94a7c90105fe306b42 /xorg-server/hw/xquartz/darwinEvents.c
parent421ecdd3ee6f691c63c4568944423d986f9f69db (diff)
parent08cbf3b50bfe713044f36b363c73768cd042f13c (diff)
downloadvcxsrv-ab5c2d2c78273ccdc7c9734bcba482a33fcf9652.tar.gz
vcxsrv-ab5c2d2c78273ccdc7c9734bcba482a33fcf9652.tar.bz2
vcxsrv-ab5c2d2c78273ccdc7c9734bcba482a33fcf9652.zip
merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xquartz/darwinEvents.c')
-rw-r--r--xorg-server/hw/xquartz/darwinEvents.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/xorg-server/hw/xquartz/darwinEvents.c b/xorg-server/hw/xquartz/darwinEvents.c
index 185df4a43..700771471 100644
--- a/xorg-server/hw/xquartz/darwinEvents.c
+++ b/xorg-server/hw/xquartz/darwinEvents.c
@@ -88,7 +88,7 @@ static pthread_mutex_t fd_add_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t fd_add_ready_cond = PTHREAD_COND_INITIALIZER;
static pthread_t fd_add_tid = NULL;
-static EventListPtr darwinEvents = NULL;
+static InternalEvent* darwinEvents = NULL;
static pthread_mutex_t mieq_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t mieq_ready_cond = PTHREAD_COND_INITIALIZER;
@@ -433,7 +433,6 @@ static void DarwinPrepareValuators(DeviceIntPtr pDev, int *valuators, ScreenPtr
void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, float pointer_x, float pointer_y,
float pressure, float tilt_x, float tilt_y) {
static int darwinFakeMouseButtonDown = 0;
- int i, num_events;
ScreenPtr screen;
int valuators[5];
@@ -486,15 +485,12 @@ void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, floa
darwinEvents_lock(); {
ValuatorMask mask;
valuator_mask_set_range(&mask, 0, (pDev == darwinPointer) ? 2 : 5, valuators);
- num_events = GetPointerEvents(darwinEvents, pDev, ev_type, ev_button,
- POINTER_ABSOLUTE, &mask);
- for(i=0; i<num_events; i++) mieqEnqueue (pDev, (InternalEvent*)darwinEvents[i].event);
- if(num_events > 0) DarwinPokeEQ();
+ QueuePointerEvents(pDev, ev_type, ev_button, POINTER_ABSOLUTE, &mask);
+ DarwinPokeEQ();
} darwinEvents_unlock();
}
void DarwinSendKeyboardEvents(int ev_type, int keycode) {
- int i, num_events;
if(!darwinEvents) {
DEBUG_LOG("DarwinSendKeyboardEvents called before darwinEvents was initialized\n");
@@ -502,15 +498,13 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) {
}
darwinEvents_lock(); {
- num_events = GetKeyboardEvents(darwinEvents, darwinKeyboard, ev_type, keycode + MIN_KEYCODE, NULL);
- for(i=0; i<num_events; i++) mieqEnqueue(darwinKeyboard, (InternalEvent*)darwinEvents[i].event);
- if(num_events > 0) DarwinPokeEQ();
+ QueueKeyboardEvents(darwinKeyboard, ev_type, keycode + MIN_KEYCODE, NULL);
+ DarwinPokeEQ();
} darwinEvents_unlock();
}
void DarwinSendProximityEvents(DeviceIntPtr pDev, int ev_type, float pointer_x, float pointer_y,
float pressure, float tilt_x, float tilt_y) {
- int i, num_events;
ScreenPtr screen;
int valuators[5];
@@ -531,9 +525,8 @@ void DarwinSendProximityEvents(DeviceIntPtr pDev, int ev_type, float pointer_x,
darwinEvents_lock(); {
ValuatorMask mask;
valuator_mask_set_range(&mask, 0, 5, valuators);
- num_events = GetProximityEvents(darwinEvents, pDev, ev_type, &mask);
- for(i=0; i<num_events; i++) mieqEnqueue (pDev, (InternalEvent*)darwinEvents[i].event);
- if(num_events > 0) DarwinPokeEQ();
+ QueueProximityEvents(pDev, ev_type, &mask);
+ DarwinPokeEQ();
} darwinEvents_unlock();
}