aboutsummaryrefslogtreecommitdiff
path: root/ui/sdl2.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/sdl2.c')
-rw-r--r--ui/sdl2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/sdl2.c b/ui/sdl2.c
index d3741f9..8cb7741 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -40,6 +40,8 @@ static struct sdl2_console *sdl2_console;
static SDL_Surface *guest_sprite_surface;
static int gui_grab; /* if true, all keyboard/mouse events are grabbed */
+static bool alt_grab;
+static bool ctrl_grab;
static int gui_saved_grab;
static int gui_fullscreen;
@@ -853,6 +855,14 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
gui_fullscreen = o->has_full_screen && o->full_screen;
+ if (o->u.sdl.has_grab_mod) {
+ if (o->u.sdl.grab_mod == HOT_KEY_MOD_LSHIFT_LCTRL_LALT) {
+ alt_grab = true;
+ } else if (o->u.sdl.grab_mod == HOT_KEY_MOD_RCTRL) {
+ ctrl_grab = true;
+ }
+ }
+
for (i = 0;; i++) {
QemuConsole *con = qemu_console_lookup_by_index(i);
if (!con) {