qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ui/gtk: Respect -show-cursor option
@ 2020-01-29 19:17 Joshua Watt
  0 siblings, 0 replies; 2+ messages in thread
From: Joshua Watt @ 2020-01-29 19:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Joshua Watt

If the user specifies the -show-cursor option, force the cursor to be
shown even if it would not otherwise.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 ui/gtk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index d18892d1de..bdd1b53236 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -258,7 +258,8 @@ static void gd_update_cursor(VirtualConsole *vc)
     }
 
     window = gtk_widget_get_window(GTK_WIDGET(vc->gfx.drawing_area));
-    if (s->full_screen || qemu_input_is_absolute() || s->ptr_owner == vc) {
+    if (cursor_hide &&
+        (s->full_screen || qemu_input_is_absolute() || s->ptr_owner == vc)) {
         gdk_window_set_cursor(window, s->null_cursor);
     } else {
         gdk_window_set_cursor(window, NULL);
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] ui/gtk: Respect -show-cursor option
@ 2020-01-29 19:42 Joshua Watt
  0 siblings, 0 replies; 2+ messages in thread
From: Joshua Watt @ 2020-01-29 19:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Joshua Watt

If the user specifies the -show-cursor option, force the cursor to be
shown even if it would not otherwise.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 ui/gtk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index d18892d1de..bdd1b53236 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -258,7 +258,8 @@ static void gd_update_cursor(VirtualConsole *vc)
     }
 
     window = gtk_widget_get_window(GTK_WIDGET(vc->gfx.drawing_area));
-    if (s->full_screen || qemu_input_is_absolute() || s->ptr_owner == vc) {
+    if (cursor_hide &&
+        (s->full_screen || qemu_input_is_absolute() || s->ptr_owner == vc)) {
         gdk_window_set_cursor(window, s->null_cursor);
     } else {
         gdk_window_set_cursor(window, NULL);
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-29 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-29 19:17 [PATCH] ui/gtk: Respect -show-cursor option Joshua Watt
  -- strict thread matches above, loose matches on Subject: below --
2020-01-29 19:42 Joshua Watt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).