[PATCH 2/5] ui/gtk: implement show-cursor option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>
---
 ui/gtk.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index d18892d1de61..78b197ade4c1 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -247,6 +247,7 @@ static void gd_update_cursor(VirtualConsole *vc)
 {
     GtkDisplayState *s = vc->s;
     GdkWindow *window;
+    bool allow_hide_cursor = true;
 
     if (vc->type != GD_VC_GFX ||
         !qemu_console_is_graphic(vc->gfx.dcl.con)) {
@@ -257,8 +258,13 @@ static void gd_update_cursor(VirtualConsole *vc)
         return;
     }
 
+    if (s->opts->has_show_cursor && s->opts->show_cursor) {
+        allow_hide_cursor = false;
+    }
+
     window = gtk_widget_get_window(GTK_WIDGET(vc->gfx.drawing_area));
-    if (s->full_screen || qemu_input_is_absolute() || s->ptr_owner == vc) {
+    if (allow_hide_cursor &&
+        (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.18.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux