[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] Fix clearing modifiers on focus loss
From: |
Brad Jorsch |
Subject: |
[Qemu-devel] [PATCH 1/2] Fix clearing modifiers on focus loss |
Date: |
Wed, 5 May 2010 00:17:08 -0400 |
It seems there is an intention to clear all modifier keys (in the SDL
front-end) when the window loses focus, but it seems that it doesn't
work right. Let's just explicitly do it when we lose input focus.
Signed-off-by: Brad Jorsch <address@hidden>
---
sdl.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sdl.c b/sdl.c
index f6fabf1..c155113 100644
--- a/sdl.c
+++ b/sdl.c
@@ -728,6 +728,9 @@ static void sdl_refresh(DisplayState *ds)
}
break;
case SDL_ACTIVEEVENT:
+ if (ev->active.state == SDL_APPINPUTFOCUS && !ev->active.gain) {
+ reset_keys();
+ }
if (gui_grab && ev->active.state == SDL_APPINPUTFOCUS &&
!ev->active.gain && !gui_fullscreen_initial_grab) {
sdl_grab_end();
--
1.7.1