diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2020-02-13 11:06:32 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2020-02-13 11:06:32 +0000 |
| commit | 7ce9ce89930ce260af839fb3e3e5f9101f5c69a0 (patch) | |
| tree | 216d31108b65618572964e8595c2c9d56b77ca97 /ui/sdl2.c | |
| parent | e18e5501d8ac692d32657a3e1ef545b14e72b730 (diff) | |
| parent | 483644c25b932360018d15818d8bcd8c85ba70b8 (diff) | |
| download | focaccia-qemu-7ce9ce89930ce260af839fb3e3e5f9101f5c69a0.tar.gz focaccia-qemu-7ce9ce89930ce260af839fb3e3e5f9101f5c69a0.zip | |
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20200212-pull-request' into staging
gtk: refresh rate fix. cocoa: drop pre-10.12 support. ui: rework show-cursor option. # gpg: Signature made Wed 12 Feb 2020 16:18:17 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20200212-pull-request: ui/cocoa: Drop workarounds for pre-10.12 OSX ui: deprecate legacy -show-cursor option ui: drop curor_hide global variable. ui/gtk: implement show-cursor option ui/cocoa: switch to new show-cursor option ui/sdl: switch to new show-cursor option ui: wire up legacy -show-cursor option ui: add show-cursor option ui/gtk: Fix gd_refresh_rate_millihz() when widget window is not realized ui/gtk: Update gd_refresh_rate_millihz() to handle VirtualConsole Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/sdl2.c')
| -rw-r--r-- | ui/sdl2.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/sdl2.c b/ui/sdl2.c index 9030f1c42e..3c9424eb42 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -161,9 +161,9 @@ static void sdl_update_caption(struct sdl2_console *scon) } } -static void sdl_hide_cursor(void) +static void sdl_hide_cursor(struct sdl2_console *scon) { - if (!cursor_hide) { + if (scon->opts->has_show_cursor && scon->opts->show_cursor) { return; } @@ -175,9 +175,9 @@ static void sdl_hide_cursor(void) } } -static void sdl_show_cursor(void) +static void sdl_show_cursor(struct sdl2_console *scon) { - if (!cursor_hide) { + if (scon->opts->has_show_cursor && scon->opts->show_cursor) { return; } @@ -216,7 +216,7 @@ static void sdl_grab_start(struct sdl2_console *scon) SDL_WarpMouseInWindow(scon->real_window, guest_x, guest_y); } } else { - sdl_hide_cursor(); + sdl_hide_cursor(scon); } SDL_SetWindowGrab(scon->real_window, SDL_TRUE); gui_grab = 1; @@ -227,7 +227,7 @@ static void sdl_grab_end(struct sdl2_console *scon) { SDL_SetWindowGrab(scon->real_window, SDL_FALSE); gui_grab = 0; - sdl_show_cursor(); + sdl_show_cursor(scon); sdl_update_caption(scon); } @@ -658,7 +658,7 @@ static void sdl_mouse_warp(DisplayChangeListener *dcl, if (on) { if (!guest_cursor) { - sdl_show_cursor(); + sdl_show_cursor(scon); } if (gui_grab || qemu_input_is_absolute() || absolute_enabled) { SDL_SetCursor(guest_sprite); @@ -667,7 +667,7 @@ static void sdl_mouse_warp(DisplayChangeListener *dcl, } } } else if (gui_grab) { - sdl_hide_cursor(); + sdl_hide_cursor(scon); } guest_cursor = on; guest_x = x, guest_y = y; |