From nobody Fri Mar 29 11:25:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; 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 207.211.31.81 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-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1581070694427660.8877930890842; Fri, 7 Feb 2020 02:18:14 -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-321-4MMPjIf9O4Go9T5EQcWjvQ-1; Fri, 07 Feb 2020 05:18:10 -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 B6B4F1088387; Fri, 7 Feb 2020 10:18:04 +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 67CD1790E5; Fri, 7 Feb 2020 10:18:04 +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 84A82866B9; Fri, 7 Feb 2020 10:18:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 017AHx9U029028 for ; Fri, 7 Feb 2020 05:17:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 809588E9FE; Fri, 7 Feb 2020 10:17:59 +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 367CB8DC1B; Fri, 7 Feb 2020 10:17:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7205E9AB9; 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=1581070693; 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=U76q4D5XTtLTt2CDspShP4lVgxifjYCWQLI5qDY6RZo=; b=h+jHg0AJ2+TT54zoDCLmzl2iz1FRyYf9Uwd5EPrlVYB/zPVZt+P5yM50XQpCgCSG9fXp05 o6SxsupAXnazJEiQ548rgYPqaQ0l+THSxnn1Z7Z2T2iIdJBtNg0EPnWQ7+LPhkQAax836c Z6WSjsP643T2lTuUXwKPl+B27cajya4= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 1/7] ui: add show-cursor option Date: Fri, 7 Feb 2020 11:17:47 +0100 Message-Id: <20200207101753.25812-2-kraxel@redhat.com> In-Reply-To: <20200207101753.25812-1-kraxel@redhat.com> References: <20200207101753.25812-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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: 4MMPjIf9O4Go9T5EQcWjvQ-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 enabled, this forces showing the mouse cursor, i.e. do not hide the pointer on mouse grabs. Defaults to off. Signed-off-by: Gerd Hoffmann Reviewed-by: J=C3=A1n Tomko Reviewed-by: Markus Armbruster --- qapi/ui.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qapi/ui.json b/qapi/ui.json index e04525d8b44b..b9df7fe7b5cb 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1144,6 +1144,8 @@ # @type: Which DisplayType qemu should use. # @full-screen: Start user interface in fullscreen mode (default: off). # @window-close: Allow to quit qemu with window close button (default: on= ). +# @show-cursor: Force showing the mouse cursor (default: off). +# Since: 5.0 # @gl: Enable OpenGL support (default: off). # # Since: 2.12 @@ -1153,6 +1155,7 @@ 'base' : { 'type' : 'DisplayType', '*full-screen' : 'bool', '*window-close' : 'bool', + '*show-cursor' : 'bool', '*gl' : 'DisplayGLMode' }, 'discriminator' : 'type', 'data' : { 'gtk' : 'DisplayGTK', --=20 2.18.1 From nobody Fri Mar 29 11:25:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581070748167476.6375648652436; Fri, 7 Feb 2020 02:19:08 -0800 (PST) Received: from localhost ([::1]:53424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j00j5-0000hW-0q for importer@patchew.org; Fri, 07 Feb 2020 05:19:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46990) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j00i5-0007oM-V4 for qemu-devel@nongnu.org; Fri, 07 Feb 2020 05:18:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j00i4-0008JI-NU for qemu-devel@nongnu.org; Fri, 07 Feb 2020 05:18:05 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:39434 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j00i4-0008Ir-KD for qemu-devel@nongnu.org; Fri, 07 Feb 2020 05:18:04 -0500 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-220-8ydxX-LZMwOPQKLSyt-b4A-1; Fri, 07 Feb 2020 05:18:00 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9895E14E5; Fri, 7 Feb 2020 10:17:59 +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 2E1B45C241; Fri, 7 Feb 2020 10:17:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7A7B031E89; 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=1581070684; h=from:from: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; bh=160SiUcVsBvPhbBvJZUeSzVMISGtyFZPg7v7NBTFr3s=; b=izC3cVDmx0rFORJB2JUF1AvhwKcB3cY/6gGDtLSDwKIdNRrYFS6L3VjTbb52SWlvOxbooM RD/dsPpaClouxoz0eRN1vYaxpiT+htUjzIitVsvaaU4Js3Z6YPWBeuBvMPVy6Z/kyFM3Ko GZ257PiK/7v3sZEWT3ubJ0Zvb6Rr0NU= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 2/7] ui: wire up legacy -show-cursor option Date: Fri, 7 Feb 2020 11:17:48 +0100 Message-Id: <20200207101753.25812-3-kraxel@redhat.com> In-Reply-To: <20200207101753.25812-1-kraxel@redhat.com> References: <20200207101753.25812-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: 8ydxX-LZMwOPQKLSyt-b4A-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , jtomko@redhat.com, libvir-list@redhat.com, Markus Armbruster , jpewhacker@gmail.com, Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Set new show-cursor display option when legacy -show-cursor is specified on the command line. Signed-off-by: Gerd Hoffmann Reviewed-by: J=C3=A1n Tomko --- vl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vl.c b/vl.c index 7dcb0879c497..5419b3d68200 100644 --- a/vl.c +++ b/vl.c @@ -3554,6 +3554,8 @@ int main(int argc, char **argv, char **envp) break; case QEMU_OPTION_show_cursor: cursor_hide =3D 0; + dpy.has_show_cursor =3D true; + dpy.show_cursor =3D true; break; case QEMU_OPTION_uuid: if (qemu_uuid_parse(optarg, &qemu_uuid) < 0) { --=20 2.18.1 From nobody Fri Mar 29 11:25:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.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 205.139.110.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 [205.139.110.120]) by mx.zohomail.com with SMTPS id 1581070719972522.6119436554479; Fri, 7 Feb 2020 02:18:39 -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-430-rGniqIZaPnygMvb5UdoENw-1; Fri, 07 Feb 2020 05:18:36 -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 0BE301007277; Fri, 7 Feb 2020 10:18:29 +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 D68078DC3E; Fri, 7 Feb 2020 10:18:28 +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 90BC118089D5; Fri, 7 Feb 2020 10:18:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 017AHx6Q029045 for ; Fri, 7 Feb 2020 05:17:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id C6E305DA83; Fri, 7 Feb 2020 10:17:59 +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 322C95DA7D; Fri, 7 Feb 2020 10:17:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 848E531EAC; 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=1581070718; 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=DuM2nl8dOdAd8yN5ihNsFvt4btiTK4V3fnxUcpfgEO0=; b=cU7OZIm+V74XKVHiV/+Tzgmxo1mcRHZ0v52NNN6ySMxBe5rVGi8Lp7LT/xXOp7IinsTr2F pBxcQ3dYTUV7YrsY8T+IjNHeIgQ1v/7qgPQTcvd37igzjqCxl/sqhb+3aI3SbNaX9CeKA2 dHi3iivTeTqQE8/XF4Oyfun8r5znjws= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 3/7] ui/sdl: switch to new show-cursor option Date: Fri, 7 Feb 2020 11:17:49 +0100 Message-Id: <20200207101753.25812-4-kraxel@redhat.com> In-Reply-To: <20200207101753.25812-1-kraxel@redhat.com> References: <20200207101753.25812-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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: rGniqIZaPnygMvb5UdoENw-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" Use DisplayOpts settings instead of cursor_hide global variable. Also make "-display sdl,show-cursor=3Don" work. Signed-off-by: Gerd Hoffmann Reviewed-by: J=C3=A1n Tomko --- ui/sdl2.c | 16 ++++++++-------- vl.c | 10 ++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index 9030f1c42efb..3c9424eb42c3 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -161,9 +161,9 @@ static void sdl_update_caption(struct sdl2_console *sco= n) } } =20 -static void sdl_hide_cursor(void) +static void sdl_hide_cursor(struct sdl2_console *scon) { - if (!cursor_hide) { + if (scon->opts->has_show_cursor && scon->opts->show_cursor) { return; } =20 @@ -175,9 +175,9 @@ static void sdl_hide_cursor(void) } } =20 -static void sdl_show_cursor(void) +static void sdl_show_cursor(struct sdl2_console *scon) { - if (!cursor_hide) { + if (scon->opts->has_show_cursor && scon->opts->show_cursor) { return; } =20 @@ -216,7 +216,7 @@ static void sdl_grab_start(struct sdl2_console *scon) SDL_WarpMouseInWindow(scon->real_window, guest_x, guest_y); } } else { - sdl_hide_cursor(); + sdl_hide_cursor(scon); } SDL_SetWindowGrab(scon->real_window, SDL_TRUE); gui_grab =3D 1; @@ -227,7 +227,7 @@ static void sdl_grab_end(struct sdl2_console *scon) { SDL_SetWindowGrab(scon->real_window, SDL_FALSE); gui_grab =3D 0; - sdl_show_cursor(); + sdl_show_cursor(scon); sdl_update_caption(scon); } =20 @@ -658,7 +658,7 @@ static void sdl_mouse_warp(DisplayChangeListener *dcl, =20 if (on) { if (!guest_cursor) { - sdl_show_cursor(); + sdl_show_cursor(scon); } if (gui_grab || qemu_input_is_absolute() || absolute_enabled) { SDL_SetCursor(guest_sprite); @@ -667,7 +667,7 @@ static void sdl_mouse_warp(DisplayChangeListener *dcl, } } } else if (gui_grab) { - sdl_hide_cursor(); + sdl_hide_cursor(scon); } guest_cursor =3D on; guest_x =3D x, guest_y =3D y; diff --git a/vl.c b/vl.c index 5419b3d68200..0a13cf2b1724 100644 --- a/vl.c +++ b/vl.c @@ -1931,6 +1931,16 @@ static void parse_display(const char *p) } else { goto invalid_sdl_args; } + } else if (strstart(opts, ",show-cursor=3D", &nextopt)) { + opts =3D nextopt; + dpy.has_show_cursor =3D true; + if (strstart(opts, "on", &nextopt)) { + dpy.show_cursor =3D true; + } else if (strstart(opts, "off", &nextopt)) { + dpy.show_cursor =3D false; + } else { + goto invalid_sdl_args; + } } else if (strstart(opts, ",gl=3D", &nextopt)) { opts =3D nextopt; dpy.has_gl =3D true; --=20 2.18.1 From nobody Fri Mar 29 11:25:25 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-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1581070693706988.3943961630965; Fri, 7 Feb 2020 02:18:13 -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-304-rXg3EVgEPoadHe8fYxI8sw-1; Fri, 07 Feb 2020 05:18:09 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B8688800D5C; Fri, 7 Feb 2020 10:18:04 +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 6017660C05; Fri, 7 Feb 2020 10:18:04 +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 E3E7A18089C8; Fri, 7 Feb 2020 10:18:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 017AHxeb029025 for ; Fri, 7 Feb 2020 05:17:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 742458ECEA; Fri, 7 Feb 2020 10:17:59 +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 39D958DC3E; Fri, 7 Feb 2020 10:17:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8CD9C31EC0; 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=1581070692; 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=Foy/ugqDRtAJgsmy22Lpc5Vs+TT1uH6lhDQn8q3Q0o4=; b=feQzzBWwQ9mwQtOyUDVN8mIQ0ROhYbCOB2mS1/OvJ0vywBVvu1wYXJoMKYJMcHd7pouJ54 xmyGIsVBDe/iHpGaMsddcehHs/BoEKP75UG7yYrA9IPJKCj9LgnDrIAXdmJO+KkP6b0lfx 0wQuyidfrICEphOU5yv+dujvTaQHt+8= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 4/7] ui/cocoa: switch to new show-cursor option Date: Fri, 7 Feb 2020 11:17:50 +0100 Message-Id: <20200207101753.25812-5-kraxel@redhat.com> In-Reply-To: <20200207101753.25812-1-kraxel@redhat.com> References: <20200207101753.25812-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.12 X-MC-Unique: rXg3EVgEPoadHe8fYxI8sw-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" Use DisplayOpts settings to set the new file-global cursor_hide variable, stop using the qemu-global cursor_hide variable. Signed-off-by: Gerd Hoffmann Reviewed-by: J=C3=A1n Tomko --- ui/cocoa.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index fbb5b1b45f81..f7b323044582 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -125,6 +125,7 @@ typedef struct { NSWindow *normalWindow, *about_window; static DisplayChangeListener *dcl; static int last_buttons; +static int cursor_hide =3D 1; =20 int gArgc; char **gArgv; @@ -1918,6 +1919,9 @@ static void cocoa_display_init(DisplayState *ds, Disp= layOptions *opts) [(QemuCocoaAppController *)[[NSApplication sharedApplication] = delegate] toggleFullScreen: nil]; }); } + if (opts->has_show_cursor && opts->show_cursor) { + cursor_hide =3D 0; + } =20 dcl =3D g_malloc0(sizeof(DisplayChangeListener)); =20 --=20 2.18.1 From nobody Fri Mar 29 11:25:25 2024 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 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 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 From nobody Fri Mar 29 11:25:25 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-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1581070713720663.9365592417117; Fri, 7 Feb 2020 02:18:33 -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-362-8PWFE9Z-Oee8moKnYalFOQ-1; Fri, 07 Feb 2020 05:18:30 -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 3E8C31414; Fri, 7 Feb 2020 10:18: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 D826A790EA; Fri, 7 Feb 2020 10:18:24 +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 7FF1E866BB; Fri, 7 Feb 2020 10:18:24 +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 017AI55T029089 for ; Fri, 7 Feb 2020 05:18:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id 402381001DF2; 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 3088B1001B28; Fri, 7 Feb 2020 10:18:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9F25331F2A; 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=1581070712; 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=i3cq53tpoa9+e9edeCuo1Vd1Vpo2LSWIBS8mpEz4xuc=; b=Qr+lXBX5zouSAxzBsf+wXsLtEwPae/UJyU67QqatxwToY7fVmx4Xfj93ZLdm/CFcBlwlEQ hd3m0dvREKVxj0IwSK+kbf/8RL1Oh7auUWJBdkFYttGEMFlufmPhQ0MBEbvgdGv90+o3pD UXE8pKgRQWBpCOjFh+ZyBWw+GBa6pk8= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 6/7] ui: drop curor_hide global variable. Date: Fri, 7 Feb 2020 11:17:52 +0100 Message-Id: <20200207101753.25812-7-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.15 X-MC-Unique: 8PWFE9Z-Oee8moKnYalFOQ-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" No users left. Signed-off-by: Gerd Hoffmann Reviewed-by: J=C3=A1n Tomko --- include/sysemu/sysemu.h | 1 - vl.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 6358a324a711..7956e9054ade 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -41,7 +41,6 @@ extern const char *keyboard_layout; extern int win2k_install_hack; extern int alt_grab; extern int ctrl_grab; -extern int cursor_hide; extern int graphic_rotate; extern int no_shutdown; extern int old_param; diff --git a/vl.c b/vl.c index 0a13cf2b1724..62efcd15c0bf 100644 --- a/vl.c +++ b/vl.c @@ -168,7 +168,6 @@ int no_hpet =3D 0; int fd_bootchk =3D 1; static int no_reboot; int no_shutdown =3D 0; -int cursor_hide =3D 1; int graphic_rotate =3D 0; const char *watchdog; QEMUOptionRom option_rom[MAX_OPTION_ROMS]; @@ -3563,7 +3562,6 @@ int main(int argc, char **argv, char **envp) no_shutdown =3D 1; break; case QEMU_OPTION_show_cursor: - cursor_hide =3D 0; dpy.has_show_cursor =3D true; dpy.show_cursor =3D true; break; --=20 2.18.1 From nobody Fri Mar 29 11:25:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158107074889586.50586067122651; Fri, 7 Feb 2020 02:19:08 -0800 (PST) Received: from localhost ([::1]:53426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j00j5-0000ji-Po for importer@patchew.org; Fri, 07 Feb 2020 05:19:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46983) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j00i5-0007oL-V6 for qemu-devel@nongnu.org; Fri, 07 Feb 2020 05:18:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j00i4-0008Ij-40 for qemu-devel@nongnu.org; Fri, 07 Feb 2020 05:18:04 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:35036 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j00i4-0008IJ-0a for qemu-devel@nongnu.org; Fri, 07 Feb 2020 05:18:04 -0500 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-189-hamCI95TPXunygeXr0nRpQ-1; Fri, 07 Feb 2020 05:18:01 -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 B7C731800D42; Fri, 7 Feb 2020 10:18:00 +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 34AE78DC1B; Fri, 7 Feb 2020 10:18:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A8B8A31F39; 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=1581070683; h=from:from: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; bh=RQBUJMB6krSUmgzQZ6BPnb8XzGLFZ87WgXh0Fww/3Cs=; b=SL6cgxBFmWUVEC2/2Y3zGF/etVuVC+YFVKN+q1R0wXWCzbHkaAZaUzQDra9auWBSoGr+kq Xc1imB2W9zJ54aV839DwtiTJ7ZDDQ4bxUgnbLoSCHqUR2orqWQU65XaiMwOT2jgC6HonpV 7uy6tEwy69Eh7oSSfm9Fa+3ytG5hNVM= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 7/7] ui: deprecate legacy -show-cursor option Date: Fri, 7 Feb 2020 11:17:53 +0100 Message-Id: <20200207101753.25812-8-kraxel@redhat.com> In-Reply-To: <20200207101753.25812-1-kraxel@redhat.com> References: <20200207101753.25812-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: hamCI95TPXunygeXr0nRpQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , jtomko@redhat.com, libvir-list@redhat.com, Markus Armbruster , jpewhacker@gmail.com, Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Reviewed-by: J=C3=A1n Tomko --- vl.c | 2 ++ qemu-deprecated.texi | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/vl.c b/vl.c index 62efcd15c0bf..001be469c2e9 100644 --- a/vl.c +++ b/vl.c @@ -3562,6 +3562,8 @@ int main(int argc, char **argv, char **envp) no_shutdown =3D 1; break; case QEMU_OPTION_show_cursor: + warn_report("The -show-cursor option is deprecated, " + "use -display {sdl,gtk},show-cursor=3Don inste= ad"); dpy.has_show_cursor =3D true; dpy.show_cursor =3D true; break; diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index ea3e10bde398..c1444d1839bd 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -148,6 +148,11 @@ QEMU 5.0 introduced an alternative syntax to specify t= he size of the translation block cache, @option{-accel tcg,tb-size=3D}. The new syntax deprecates the previously available @option{-tb-size} option. =20 +@subsection -show-cursor option (since 5.0) + +Use @option{-display sdl,show-cursor=3Don} or + @option{-display gtk,show-cursor=3Don} instead. + @section QEMU Machine Protocol (QMP) commands =20 @subsection change (since 2.5.0) --=20 2.18.1