diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-10-03 13:29:03 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-10-03 13:29:03 +0000 |
commit | d63d307f6e00856dae25e9cd3d96bc0ba31ff107 (patch) | |
tree | 49f92edee218e0539865d0b8b39a10383bf7d2ce /sdl.c | |
parent | hack for bootp support (diff) | |
download | qemu-kvm-d63d307f6e00856dae25e9cd3d96bc0ba31ff107.tar.gz qemu-kvm-d63d307f6e00856dae25e9cd3d96bc0ba31ff107.tar.bz2 qemu-kvm-d63d307f6e00856dae25e9cd3d96bc0ba31ff107.zip |
-loadvm and -full-screen options
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1090 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'sdl.c')
-rw-r--r-- | sdl.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -40,6 +40,7 @@ static int gui_saved_grab; static int gui_fullscreen; static int gui_key_modifier_pressed; static int gui_keysym; +static int gui_fullscreen_initial_grab; static void sdl_update(DisplayState *ds, int x, int y, int w, int h) { @@ -525,7 +526,8 @@ static void sdl_refresh(DisplayState *ds) } break; case SDL_ACTIVEEVENT: - if (gui_grab && (ev->active.gain & SDL_ACTIVEEVENTMASK) == 0) { + if (gui_grab && (ev->active.gain & SDL_ACTIVEEVENTMASK) == 0 && + !gui_fullscreen_initial_grab) { sdl_grab_end(); } break; @@ -540,7 +542,7 @@ static void sdl_cleanup(void) SDL_Quit(); } -void sdl_display_init(DisplayState *ds) +void sdl_display_init(DisplayState *ds, int full_screen) { int flags; @@ -566,4 +568,9 @@ void sdl_display_init(DisplayState *ds) gui_grab = 0; atexit(sdl_cleanup); + if (full_screen) { + gui_fullscreen = 1; + gui_fullscreen_initial_grab = 1; + sdl_grab_start(); + } } |