diff mbox series

[4/5] ui: wire up legacy -show-cursor option

Message ID 20200205110356.3491-5-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series ui: rework -show-cursor option | expand

Commit Message

Gerd Hoffmann Feb. 5, 2020, 11:03 a.m. UTC
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 include/sysemu/sysemu.h | 1 -
 vl.c                    | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Ján Tomko Feb. 5, 2020, 10:43 p.m. UTC | #1
On Wed, Feb 05, 2020 at 12:03:55PM +0100, Gerd Hoffmann wrote:
>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>---
> include/sysemu/sysemu.h | 1 -
> vl.c                    | 4 ++--
> 2 files changed, 2 insertions(+), 3 deletions(-)
>

>diff --git a/vl.c b/vl.c
>index 24951b51a94b..0db0aa0fa040 100644
>--- a/vl.c
>+++ b/vl.c
>@@ -3553,7 +3552,8 @@ int main(int argc, char **argv, char **envp)
>                 no_shutdown = 1;
>                 break;
>             case QEMU_OPTION_show_cursor:
>-                cursor_hide = 0;

Since commit 13aefd303cf996c2d183e94082413885bf1d15bf
cursor_hide is also used in ui/cocoa.m

Jano

>+                dpy.has_show_cursor = true;
>+                dpy.show_cursor = true;
>                 break;
>             case QEMU_OPTION_uuid:
>                 if (qemu_uuid_parse(optarg, &qemu_uuid) < 0) {
>-- 
>2.18.1
>
>
diff mbox series

Patch

diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 80c57fdc4e64..da2f87c3e63a 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -42,7 +42,6 @@  extern const char *keyboard_layout;
 extern int win2k_install_hack;
 extern int alt_grab;
 extern int ctrl_grab;
-extern int cursor_hide;
 extern int graphic_rotate;
 extern int no_quit;
 extern int no_shutdown;
diff --git a/vl.c b/vl.c
index 24951b51a94b..0db0aa0fa040 100644
--- a/vl.c
+++ b/vl.c
@@ -168,7 +168,6 @@  int no_hpet = 0;
 int fd_bootchk = 1;
 static int no_reboot;
 int no_shutdown = 0;
-int cursor_hide = 1;
 int graphic_rotate = 0;
 const char *watchdog;
 QEMUOptionRom option_rom[MAX_OPTION_ROMS];
@@ -3553,7 +3552,8 @@  int main(int argc, char **argv, char **envp)
                 no_shutdown = 1;
                 break;
             case QEMU_OPTION_show_cursor:
-                cursor_hide = 0;
+                dpy.has_show_cursor = true;
+                dpy.show_cursor = true;
                 break;
             case QEMU_OPTION_uuid:
                 if (qemu_uuid_parse(optarg, &qemu_uuid) < 0) {