提交 44f017d0 编写于 作者: G Gerd Hoffmann

sdl2: turn on keyboard grabs

Makes quite some keys actually go to the guest instead of
being captured by the host window manager.
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: NMax Reitz <mreitz@redhat.com>
上级 8fc1a3f5
......@@ -189,11 +189,11 @@ static void sdl_update_caption(struct sdl2_console *scon)
status = " [Stopped]";
} else if (gui_grab) {
if (alt_grab) {
status = " - Press Ctrl-Alt-Shift to exit mouse grab";
status = " - Press Ctrl-Alt-Shift to exit grab";
} else if (ctrl_grab) {
status = " - Press Right-Ctrl to exit mouse grab";
status = " - Press Right-Ctrl to exit grab";
} else {
status = " - Press Ctrl-Alt to exit mouse grab";
status = " - Press Ctrl-Alt to exit grab";
}
}
......@@ -785,6 +785,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
SDL_GetError());
exit(1);
}
SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1");
for (i = 0;; i++) {
QemuConsole *con = qemu_console_lookup_by_index(i);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册