From: Gerd Hoffmann Date: Thu, 6 Feb 2020 11:27:50 +0000 (+0100) Subject: ui/cocoa: switch to new show-cursor option X-Git-Tag: v5.0.0-rc0~97^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3487da6aeb127407f4f0bf5f683c90fe5c34d6c5;p=thirdparty%2Fqemu.git ui/cocoa: switch to new show-cursor option Use DisplayOpts settings to set the new file-global cursor_hide variable, stop using the qemu-global cursor_hide variable. Signed-off-by: Gerd Hoffmann Reviewed-by: Ján Tomko --- diff --git a/ui/cocoa.m b/ui/cocoa.m index fbb5b1b45f8..f7b32304458 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -125,6 +125,7 @@ typedef struct { NSWindow *normalWindow, *about_window; static DisplayChangeListener *dcl; static int last_buttons; +static int cursor_hide = 1; int gArgc; char **gArgv; @@ -1918,6 +1919,9 @@ static void cocoa_display_init(DisplayState *ds, DisplayOptions *opts) [(QemuCocoaAppController *)[[NSApplication sharedApplication] delegate] toggleFullScreen: nil]; }); } + if (opts->has_show_cursor && opts->show_cursor) { + cursor_hide = 0; + } dcl = g_malloc0(sizeof(DisplayChangeListener));