mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
avoid stopping QEMU when switching desktops with Ctrl-Alt-x
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1954 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
8785a8ddcc
commit
c66b0d4cf4
14
sdl.c
14
sdl.c
@ -447,10 +447,18 @@ static void sdl_refresh(DisplayState *ds)
|
||||
gui_key_modifier_pressed = 0;
|
||||
if (gui_keysym == 0) {
|
||||
/* exit/enter grab if pressing Ctrl-Alt */
|
||||
if (!gui_grab)
|
||||
sdl_grab_start();
|
||||
else
|
||||
if (!gui_grab) {
|
||||
/* if the application is not active,
|
||||
do not try to enter grab state. It
|
||||
prevents
|
||||
'SDL_WM_GrabInput(SDL_GRAB_ON)'
|
||||
from blocking all the application
|
||||
(SDL bug). */
|
||||
if (SDL_GetAppState() & SDL_APPACTIVE)
|
||||
sdl_grab_start();
|
||||
} else {
|
||||
sdl_grab_end();
|
||||
}
|
||||
/* SDL does not send back all the
|
||||
modifiers key, so we must correct it */
|
||||
reset_keys();
|
||||
|
Loading…
Reference in New Issue
Block a user