From nobody Thu Nov 13 14:54:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1580988585948689.919839116732; Thu, 6 Feb 2020 03:29:45 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-195-bI2KjxCAPVqjBm8d8mJnzA-1; Thu, 06 Feb 2020 06:29:41 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C93F5101FC66; Thu, 6 Feb 2020 11:29:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A0352790FF; Thu, 6 Feb 2020 11:29:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5BBF4866B0; Thu, 6 Feb 2020 11:29:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 016BTFCj017492 for ; Thu, 6 Feb 2020 06:29:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id 25D921001B09; Thu, 6 Feb 2020 11:29:15 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-112.ams2.redhat.com [10.36.116.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF85110016DA; Thu, 6 Feb 2020 11:29:09 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0E0949D14; Thu, 6 Feb 2020 12:29:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580988584; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=RodwXT1V2+0JjqSWCZGAHL7wdPoLcCIjVfQumGdbC6U=; b=CT2239zPn5JrgGJs923yxNtab5XdPtREieC5XfrSaZP8ivoG/q/OyEcgIvBQBFkvEFyDHw h3qYT7irOuBQs5jcbAd4ROfIpuzjWbdgPiKMHRZuRLBQ2SZBU1YsvaGi2m2XtAYPShnN5K 5IVVgsSYF4fQTNyzB19qzmvHQ4OR/7I= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 2/6] ui/gtk: implement show-cursor option Date: Thu, 6 Feb 2020 12:29:04 +0100 Message-Id: <20200206112908.5002-3-kraxel@redhat.com> In-Reply-To: <20200206112908.5002-1-kraxel@redhat.com> References: <20200206112908.5002-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Peter Maydell , jtomko@redhat.com, libvir-list@redhat.com, jpewhacker@gmail.com, Gerd Hoffmann , Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: bI2KjxCAPVqjBm8d8mJnzA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Reviewed-by: J=C3=A1n Tomko --- 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 =3D vc->s; GdkWindow *window; + bool allow_hide_cursor =3D true; =20 if (vc->type !=3D GD_VC_GFX || !qemu_console_is_graphic(vc->gfx.dcl.con)) { @@ -257,8 +258,13 @@ static void gd_update_cursor(VirtualConsole *vc) return; } =20 + if (s->opts->has_show_cursor && s->opts->show_cursor) { + allow_hide_cursor =3D false; + } + window =3D gtk_widget_get_window(GTK_WIDGET(vc->gfx.drawing_area)); - if (s->full_screen || qemu_input_is_absolute() || s->ptr_owner =3D=3D = vc) { + if (allow_hide_cursor && + (s->full_screen || qemu_input_is_absolute() || s->ptr_owner =3D=3D= vc)) { gdk_window_set_cursor(window, s->null_cursor); } else { gdk_window_set_cursor(window, NULL); --=20 2.18.1