From nobody Mon Feb 9 02:51:11 2026 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 158107072540026.521059075527546; Fri, 7 Feb 2020 02:18: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-129-utBZTuBOOY-jLB1FkbonZw-1; Fri, 07 Feb 2020 05:18:42 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B45AB801F7D; Fri, 7 Feb 2020 10:18:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 908B18DC3E; Fri, 7 Feb 2020 10:18:36 +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 4FADC18089D5; Fri, 7 Feb 2020 10:18:36 +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 017AI5bT029088 for ; Fri, 7 Feb 2020 05:18:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id 391811001B3F; Fri, 7 Feb 2020 10:18:05 +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 2C92D1001B07; Fri, 7 Feb 2020 10:18:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 956F231F06; Fri, 7 Feb 2020 11:17:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581070724; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc: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=CTQyHIsyqt7g4h/Ul7McZ/o8NU7L021kZi8vKyPQzPs=; b=Wi3FcefnWJ7Pzn/ajTn0LZqhUc0YRCNkBJBql58Y8O4/vWLQu5HZJAviFZ6QaolaI1L214 2OLWToV0wHrrPK9pRMt4cQpw41S20INsDX9PTqT1ndcNORDepsNeOk8ICia2EFGt1414JV KdXTs/N00G1/II2jyLbarI/GFPg6ZMY= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 5/7] ui/gtk: implement show-cursor option Date: Fri, 7 Feb 2020 11:17:51 +0100 Message-Id: <20200207101753.25812-6-kraxel@redhat.com> In-Reply-To: <20200207101753.25812-1-kraxel@redhat.com> References: <20200207101753.25812-1-kraxel@redhat.com> 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.13 X-MC-Unique: utBZTuBOOY-jLB1FkbonZw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" When specified just set null_cursor to NULL so we get the default pointer instead of a blank pointer. Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index d18892d1de61..a685d1ae0848 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2243,8 +2243,12 @@ static void gtk_display_init(DisplayState *ds, Displ= ayOptions *opts) textdomain("qemu"); =20 window_display =3D gtk_widget_get_display(s->window); - s->null_cursor =3D gdk_cursor_new_for_display(window_display, - GDK_BLANK_CURSOR); + if (s->opts->has_show_cursor && s->opts->show_cursor) { + s->null_cursor =3D NULL; /* default pointer */ + } else { + s->null_cursor =3D gdk_cursor_new_for_display(window_display, + GDK_BLANK_CURSOR); + } =20 s->mouse_mode_notifier.notify =3D gd_mouse_mode_change; qemu_add_mouse_mode_change_notifier(&s->mouse_mode_notifier); --=20 2.18.1