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.
This commit is contained in:
Jeremy Huddleston 2009-04-11 16:38:02 -07:00
parent fc1dc5d71b
commit c21ca7558d

View File

@ -479,7 +479,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]);
DarwinPokeEQ();
if(num_events > 0) DarwinPokeEQ();
} darwinEvents_unlock();
}
@ -494,7 +494,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]);
DarwinPokeEQ();
if(num_events > 0) DarwinPokeEQ();
} darwinEvents_unlock();
}
@ -522,7 +522,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]);
DarwinPokeEQ();
if(num_events > 0) DarwinPokeEQ();
} darwinEvents_unlock();
}