summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2009-04-11 17:26:07 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2009-04-11 17:26:07 -0700
commit80a7bb2605f9b439d6221c0495a629a39177a018 (patch)
tree89aca4d21d7bdaeabd709a9e2e2b2584a6dde4d0
parent6f8f7c78f1b722bc70a0ea8f6340116a1e09e858 (diff)
XQuartz: Solve the tablet 100% CPU bug
This happened because we put a byte in the fd to wake up dispatch, but we never actually enqueued anything in mieq because the num_events was 0. (cherry picked from commit c21ca7558d2faf93c61f5feaafd7c878e9e21942)
-rw-r--r--hw/xquartz/darwinEvents.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index e8ed56c88..54d05fb63 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -478,7 +478,7 @@ void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, floa
num_events = GetPointerEvents(darwinEvents, pDev, ev_type, ev_button,
POINTER_ABSOLUTE, 0, pDev==darwinTabletCurrent?5:2, valuators);
for(i=0; i<num_events; i++) mieqEnqueue (pDev, darwinEvents[i].event);
- DarwinPokeEQ();
+ if(num_events > 0) DarwinPokeEQ();
} darwinEvents_unlock();
}
@@ -493,7 +493,7 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) {
darwinEvents_lock(); {
num_events = GetKeyboardEvents(darwinEvents, darwinKeyboard, ev_type, keycode + MIN_KEYCODE);
for(i=0; i<num_events; i++) mieqEnqueue(darwinKeyboard,darwinEvents[i].event);
- DarwinPokeEQ();
+ if(num_events > 0) DarwinPokeEQ();
} darwinEvents_unlock();
}
@@ -521,7 +521,7 @@ void DarwinSendProximityEvents(int ev_type, float pointer_x, float pointer_y) {
num_events = GetProximityEvents(darwinEvents, pDev, ev_type,
0, 5, valuators);
for(i=0; i<num_events; i++) mieqEnqueue (pDev,darwinEvents[i].event);
- DarwinPokeEQ();
+ if(num_events > 0) DarwinPokeEQ();
} darwinEvents_unlock();
}