diff --git a/hw/kdrive/sdl/sdl_input.c b/hw/kdrive/sdl/sdl_input.c index 69f14be3a..156eba52a 100644 --- a/hw/kdrive/sdl/sdl_input.c +++ b/hw/kdrive/sdl/sdl_input.c @@ -85,9 +85,12 @@ void sdlPollInput(void) SDL_Event event; //printf("sdlPollInput() %d thread %d fd %d\n", SDL_GetTicks(), (int) pthread_self(), sdlInputNotifyFd[0]); + while (read(sdlInputNotifyFd[0], &buf, 1) == 1) { } - while ( SDL_PollEvent(&event) ) { - switch (event.type) { + while ( SDL_PollEvent(&event) ) + { + switch (event.type) + { case SDL_MOUSEMOTION: //printf("SDL_MOUSEMOTION x:y %d:%d buttons %d\n", event.motion.x, event.motion.y, mouseState); KdEnqueuePointerEvent(sdlPointer, mouseState, event.motion.x, event.motion.y, pressure); diff --git a/xsdl-test-device.sh b/xsdl-test-device.sh index cf63ae152..92ffc1d17 100755 --- a/xsdl-test-device.sh +++ b/xsdl-test-device.sh @@ -4,4 +4,4 @@ adb forward tcp:6001 tcp:6000 -env DISPLAY=127.0.0.1:1 sh -c "x-window-manager & xlogo & xev" +env DISPLAY=127.0.0.1:1 sh -c "xfwm4 & xlogo & xev"