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 c21ca7558d)
This commit is contained in:
Jeremy Huddleston 2009-04-11 17:26:07 -07:00
parent 6f8f7c78f1
commit 80a7bb2605

View File

@ -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();
}