From nobody Fri Apr 26 02:38:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1581524407083533.5922290593909; Wed, 12 Feb 2020 08:20:07 -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-56-NGsBD-Q3MbqZAxaoC7m91Q-1; Wed, 12 Feb 2020 11:19:30 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5718AA0CCC; Wed, 12 Feb 2020 16:19:25 +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 2427D19C7F; Wed, 12 Feb 2020 16:19:25 +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 CDC428B2B3; Wed, 12 Feb 2020 16:19:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01CGIsqu030224 for ; Wed, 12 Feb 2020 11:18:54 -0500 Received: by smtp.corp.redhat.com (Postfix) id 62A6026FB6; Wed, 12 Feb 2020 16:18:54 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-39.ams2.redhat.com [10.36.117.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 686D227063; Wed, 12 Feb 2020 16:18:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 10C6D31EA0; Wed, 12 Feb 2020 17:18:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581524405; 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=0UieOV73AiBm51CMiies0SzIbjpyynbNGnm+Kn4I9e0=; b=BCRWmiTW9MNTb8wedmbO4SWSPaDRzbsVC8he35rq1xu+cOAkTkXVgZdYa8/SwD+3fFqCFC owcwzhuPUBwuknKBhwyI1uvhWYxx96T2EJJIk3KNhtw9JwpxPRJMXlF4XuhFXAVQFVMMdf vofIuO8xR1Ygg2JO11DvFnInAm74exc= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 07/10] ui/gtk: implement show-cursor option Date: Wed, 12 Feb 2020 17:18:32 +0100 Message-Id: <20200212161835.28576-8-kraxel@redhat.com> In-Reply-To: <20200212161835.28576-1-kraxel@redhat.com> References: <20200212161835.28576-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Peter Maydell , libvir-list@redhat.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.84 on 10.5.11.23 X-MC-Unique: NGsBD-Q3MbqZAxaoC7m91Q-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" When specified just set null_cursor to NULL so we get the default pointer instead of a blank pointer. Signed-off-by: Gerd Hoffmann Reviewed-by: J=C3=A1n Tomko --- ui/gtk.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 850c49bee02a..f3f0af8921d9 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2246,8 +2246,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.2