From nobody Fri Mar 29 06:01:30 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 1580900673722564.726425252505; Wed, 5 Feb 2020 03:04: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-273-KfaQTKJ6Mi6RUd0DCZ51HQ-1; Wed, 05 Feb 2020 06:04:29 -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 06DDA1835A0F; Wed, 5 Feb 2020 11:04:24 +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 D2492790C3; Wed, 5 Feb 2020 11:04:23 +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 884E318089CE; Wed, 5 Feb 2020 11:04:23 +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 015B42iK003074 for ; Wed, 5 Feb 2020 06:04:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 85B688DC03; Wed, 5 Feb 2020 11:04:02 +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 613DB86CCC; Wed, 5 Feb 2020 11:03:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 880799CAF; Wed, 5 Feb 2020 12:03:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580900672; 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=qlxHxz0zsWQXA64ftvzgeTgLUBZNT7Gc2SdOZ8OYyN8=; b=b1TaaPa9bLwR5j4/kRrBFE6zhfxjcDYPUnOQvKVeLbJvW0lVSqqCxvKNWdKH8R9psYkfkg PjIaH9KLacri2URg5aTJE1ZUSISd27R+jsvHpRFTTOMy4gaOwC/md9C5jLeouRxicH3vlm y/tTKPYBPFW0O7IsY0RS8gIY/BB1RcQ= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 1/5] ui: add show-cursor option Date: Wed, 5 Feb 2020 12:03:52 +0100 Message-Id: <20200205110356.3491-2-kraxel@redhat.com> In-Reply-To: <20200205110356.3491-1-kraxel@redhat.com> References: <20200205110356.3491-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: 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: KfaQTKJ6Mi6RUd0DCZ51HQ-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 forces showing a the mouse cursor, i.e. do nowallow the guest to hide it. Defaults to off. Signed-off-by: Gerd Hoffmann Reviewed-by: J=C3=A1n Tomko --- qapi/ui.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qapi/ui.json b/qapi/ui.json index e04525d8b44b..7c516a455631 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1144,6 +1144,7 @@ # @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). # @gl: Enable OpenGL support (default: off). # # Since: 2.12 @@ -1153,6 +1154,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 06:01:30 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 1580900657571264.0252149166512; Wed, 5 Feb 2020 03:04:17 -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-80-AIQe2z-VO4ez2Q3TAYEeqA-1; Wed, 05 Feb 2020 06:04:13 -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 273858018A3; Wed, 5 Feb 2020 11:04:07 +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 D33E6790C0; Wed, 5 Feb 2020 11:04:06 +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 C082B8175D; Wed, 5 Feb 2020 11:04:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 015B42V1003073 for ; Wed, 5 Feb 2020 06:04:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7DE2C60C18; Wed, 5 Feb 2020 11:04:02 +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 64D8260BF7; Wed, 5 Feb 2020 11:03:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 924BA9C75; Wed, 5 Feb 2020 12:03:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580900656; 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=ZVyc8HAjJeVJ4G3eNhyQFpiME3LD4DO/y41WEU9dTqg=; b=AbbNibmsKsig9tDXMG/VndXDnLz3KC9muvaFzSa7hFIM3fbSr6b5NH9iD/42Hkd0roKhYf CZJCYMofyPUoLXqvChCE7tzQsqitBFU2dgZbWLO54i8HytwrMJjvmOf/qvDbbcKXSWtp+7 syW+N7Sg/69gd0Vzun4dJ3MTREEyFCA= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 2/5] ui/gtk: implement show-cursor option Date: Wed, 5 Feb 2020 12:03:53 +0100 Message-Id: <20200205110356.3491-3-kraxel@redhat.com> In-Reply-To: <20200205110356.3491-1-kraxel@redhat.com> References: <20200205110356.3491-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: 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: AIQe2z-VO4ez2Q3TAYEeqA-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" 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 From nobody Fri Mar 29 06:01:30 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 1580900669431655.2185822184264; Wed, 5 Feb 2020 03:04:29 -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-240-tzkBRP-COaiUKNMKqPQLHQ-1; Wed, 05 Feb 2020 06:04:25 -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 F3A8CDB2B; Wed, 5 Feb 2020 11:04:19 +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 C8E065C1D8; Wed, 5 Feb 2020 11:04:19 +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 7FD128175C; Wed, 5 Feb 2020 11:04:19 +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 015B42b2003060 for ; Wed, 5 Feb 2020 06:04:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5FDE72131; Wed, 5 Feb 2020 11:04:02 +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 6A5381A7E3; Wed, 5 Feb 2020 11:03:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9C26A9C7F; Wed, 5 Feb 2020 12:03:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580900668; 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=GwUdRd2fQfsOrRbTu7Qwh8J+ZBvLle2DPqjOw4ixKx0=; b=G9lM+Dv8UsuPbPakFfuN1ZElAIlvMmgP6uhNazkEO5XJw+AlXifVd/GyzMCLeyB6ijjOx7 rRMwVI+7a51AH4PoyPlyU6UgetWeVAe9Vuznjhp67GoNRckJvAOYdy/tcegveIXiwU4R4x oh1lqtwjdK0tGNYpX7v/wsMgI2MD+t0= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 3/5] ui/sdl: implement show-cursor option Date: Wed, 5 Feb 2020 12:03:54 +0100 Message-Id: <20200205110356.3491-4-kraxel@redhat.com> In-Reply-To: <20200205110356.3491-1-kraxel@redhat.com> References: <20200205110356.3491-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: 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.16 X-MC-Unique: tzkBRP-COaiUKNMKqPQLHQ-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" Signed-off-by: Gerd Hoffmann Reviewed-by: J=C3=A1n Tomko --- ui/sdl2.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index 9030f1c42efb..e18555b10a42 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -161,9 +161,15 @@ static void sdl_update_caption(struct sdl2_console *sc= on) } } =20 -static void sdl_hide_cursor(void) +static void sdl_hide_cursor(struct sdl2_console *scon) { - if (!cursor_hide) { + bool allow_hide_cursor =3D true; + + if (scon->opts->has_show_cursor && scon->opts->show_cursor) { + allow_hide_cursor =3D false; + } + + if (!allow_hide_cursor) { return; } =20 @@ -175,9 +181,15 @@ 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) { + bool allow_hide_cursor =3D true; + + if (scon->opts->has_show_cursor && scon->opts->show_cursor) { + allow_hide_cursor =3D false; + } + + if (!allow_hide_cursor) { return; } =20 @@ -216,7 +228,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 +239,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 +670,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 +679,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; --=20 2.18.1 From nobody Fri Mar 29 06:01:30 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-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1580900657515369.35789570416284; Wed, 5 Feb 2020 03:04:17 -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-341-vdEng0BYOLG66vvtaqICbw-1; Wed, 05 Feb 2020 06:04:14 -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 42E318C86C4; Wed, 5 Feb 2020 11:04:07 +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 A377D212E; Wed, 5 Feb 2020 11:04:06 +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 BE4538175C; Wed, 5 Feb 2020 11:04:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 015B42kn003062 for ; Wed, 5 Feb 2020 06:04:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6BCC3790C8; Wed, 5 Feb 2020 11:04:02 +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 5F305790C0; Wed, 5 Feb 2020 11:03:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AEBA4939C; Wed, 5 Feb 2020 12:03:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580900656; 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=pTrNYiUvQNT+/fzdXbSfIQyC8vcvnbRrhBUzFETpfJc=; b=id6M38oVUk0MfOXqNjueummPHcy2MWiAVJJZysUs5zE8UrsnpW0LJfCWIquEEnSxZbZauZ 3X78Wgl6PX0JfsTxMEBjHOPJ2WMNu3lgdTGxYQ4iyIIBxNRq6y0gmwiZHb5cc0F7K8RxBG f+em3nfuxjQW/MPAzoNx9toTB5B/B8w= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 4/5] ui: wire up legacy -show-cursor option Date: Wed, 5 Feb 2020 12:03:55 +0100 Message-Id: <20200205110356.3491-5-kraxel@redhat.com> In-Reply-To: <20200205110356.3491-1-kraxel@redhat.com> References: <20200205110356.3491-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: 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.84 on 10.5.11.23 X-MC-Unique: vdEng0BYOLG66vvtaqICbw-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" Signed-off-by: Gerd Hoffmann --- include/sysemu/sysemu.h | 1 - vl.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 80c57fdc4e64..da2f87c3e63a 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -42,7 +42,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_quit; extern int no_shutdown; diff --git a/vl.c b/vl.c index 24951b51a94b..0db0aa0fa040 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]; @@ -3553,7 +3552,8 @@ 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; case QEMU_OPTION_uuid: if (qemu_uuid_parse(optarg, &qemu_uuid) < 0) { --=20 2.18.1 From nobody Fri Mar 29 06:01:30 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 1580900706267360.0959758118163; Wed, 5 Feb 2020 03:05:06 -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-91-mdlC_aP4PpCU0Gw8j1sZJg-1; Wed, 05 Feb 2020 06:04:36 -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 9CC3F106EB8E; Wed, 5 Feb 2020 11:04:30 +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 6C337790C3; Wed, 5 Feb 2020 11:04:30 +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 056508175F; Wed, 5 Feb 2020 11:04:30 +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 015B43oH003085 for ; Wed, 5 Feb 2020 06:04:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id 617798DC03; Wed, 5 Feb 2020 11:04:03 +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 1A4F786CCC; Wed, 5 Feb 2020 11:04:03 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BA2CB1FCF4; Wed, 5 Feb 2020 12:03:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580900705; 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=pIWT5ETxxe70P6DNoZLw6kzCewHY5ckuFSWxj8IMGqw=; b=KDRBw9tTm3YOmfAdZNcG5blDbwEaFbJGedT4OHJUe6Mxa662nEdxvgCIEYph8Ykj1gORGz beQIDv8YXtsPOpRRpPmjicKQRuE3meOdZ2qJcWgsp2BdHKb27K9YzZKxqoGQFGap5Yj8Ti 3rec58u9iW4QUZ4GLYPHCJ7oton6c+w= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 5/5] ui: deprecate legacy -show-cursor option Date: Wed, 5 Feb 2020 12:03:56 +0100 Message-Id: <20200205110356.3491-6-kraxel@redhat.com> In-Reply-To: <20200205110356.3491-1-kraxel@redhat.com> References: <20200205110356.3491-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: 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: mdlC_aP4PpCU0Gw8j1sZJg-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" 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 0db0aa0fa040..71d040257b34 100644 --- a/vl.c +++ b/vl.c @@ -3552,6 +3552,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 3d2a8ff54bae..ea4c5ca27f8e 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