From patchwork Wed Feb 5 11:03:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11366107 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F103692A for ; Wed, 5 Feb 2020 11:07:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C8FC62082E for ; Wed, 5 Feb 2020 11:07:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ES2YU/Qu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C8FC62082E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:45002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izIWN-00017M-0e for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 06:07:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45776) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izITW-0004zk-Pp for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izITV-0000Eu-Mt for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:06 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:30416 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izITV-00008z-Hu for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580900645; 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=qlxHxz0zsWQXA64ftvzgeTgLUBZNT7Gc2SdOZ8OYyN8=; b=ES2YU/QumkNFPNgQxDj+B2eKuQz9lKo9jcjyEQrJMVpvNfj3DFlD/oRmDA9k+uFwkcHO1p oWQ8gpBQ4UA/sBKSZZKtSPuPCYJG2DvTg44Lrsux0S/KTnjS+g13kDX3yLa+kmfAVVRDV+ y8xcAlLGyhOCSqp8RzR+7oShgKSGvtY= 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-432-nCXWEgKiN-2WsxLDsBPnPw-1; Wed, 05 Feb 2020 06:04:03 -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 883D61063BA1; 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) 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-MC-Unique: nCXWEgKiN-2WsxLDsBPnPw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 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: libvir-list@redhat.com, Markus Armbruster , jpewhacker@gmail.com, Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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án 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', From patchwork Wed Feb 5 11:03:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11366109 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0F72992A for ; Wed, 5 Feb 2020 11:08:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A26D2082E for ; Wed, 5 Feb 2020 11:08:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jCgvQKGu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A26D2082E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:45022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izIXg-0003US-Ix for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 06:08:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45804) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izITY-000512-AV for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izITW-0000K1-6N for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:07 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:20373 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izITW-0000F5-0U for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580900645; 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=ZVyc8HAjJeVJ4G3eNhyQFpiME3LD4DO/y41WEU9dTqg=; b=jCgvQKGu0b4ud/VJ1QDp27KuZJ81Am23+1wd3i+s6jI3WopitkOKTVto0n4M8eJMbcH3xQ pf+HrBaGpEpTokIGhiMFFXQpCccJbhsUhTe8BOjs7NFFXg0spk/3vV0AtTyhByVx511VNX vTaALScT8L520PrwB4vb8/OLag3rX2I= 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-122-KOQSnHulOcyRCr2ABH53Ew-1; Wed, 05 Feb 2020 06:04:03 -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 82D1F1063BA0; 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) 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-MC-Unique: KOQSnHulOcyRCr2ABH53Ew-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 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: libvir-list@redhat.com, Markus Armbruster , jpewhacker@gmail.com, Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Gerd Hoffmann Reviewed-by: Ján 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 = vc->s; GdkWindow *window; + bool allow_hide_cursor = true; if (vc->type != GD_VC_GFX || !qemu_console_is_graphic(vc->gfx.dcl.con)) { @@ -257,8 +258,13 @@ static void gd_update_cursor(VirtualConsole *vc) return; } + if (s->opts->has_show_cursor && s->opts->show_cursor) { + allow_hide_cursor = false; + } + window = gtk_widget_get_window(GTK_WIDGET(vc->gfx.drawing_area)); - if (s->full_screen || qemu_input_is_absolute() || s->ptr_owner == vc) { + if (allow_hide_cursor && + (s->full_screen || qemu_input_is_absolute() || s->ptr_owner == vc)) { gdk_window_set_cursor(window, s->null_cursor); } else { gdk_window_set_cursor(window, NULL); From patchwork Wed Feb 5 11:03:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11366099 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5589E112B for ; Wed, 5 Feb 2020 11:05:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C92F20674 for ; Wed, 5 Feb 2020 11:05:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NsFydWDp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C92F20674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:44942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izIUj-00079i-9Z for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 06:05:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45851) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izITZ-00053j-JA for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izITY-0000Z9-FL for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:09 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:42387 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izITX-0000TN-8V for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580900646; 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=GwUdRd2fQfsOrRbTu7Qwh8J+ZBvLle2DPqjOw4ixKx0=; b=NsFydWDpCSD/y/RBPvKOq5LFdNM8upcs3P2DgUFKrhmi3O6ol1OlsQD0eLTA1jp8YX61lz /sHW2TF8EaEXEl7gXXbXtYL5HRnWScFWPzerdwljPmEShuiwea/8ppWYtkmcmudbUUQUKR +BshP+LQtRE6shHL5aKUE8kmutAL7t0= 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-33-_oKXWm2mN_WRcS8-K6d3gw-1; Wed, 05 Feb 2020 06:04:03 -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 6229318C43C5; 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) 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-MC-Unique: _oKXWm2mN_WRcS8-K6d3gw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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: libvir-list@redhat.com, Markus Armbruster , jpewhacker@gmail.com, Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Gerd Hoffmann Reviewed-by: Ján 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 *scon) } } -static void sdl_hide_cursor(void) +static void sdl_hide_cursor(struct sdl2_console *scon) { - if (!cursor_hide) { + bool allow_hide_cursor = true; + + if (scon->opts->has_show_cursor && scon->opts->show_cursor) { + allow_hide_cursor = false; + } + + if (!allow_hide_cursor) { return; } @@ -175,9 +181,15 @@ static void sdl_hide_cursor(void) } } -static void sdl_show_cursor(void) +static void sdl_show_cursor(struct sdl2_console *scon) { - if (!cursor_hide) { + bool allow_hide_cursor = true; + + if (scon->opts->has_show_cursor && scon->opts->show_cursor) { + allow_hide_cursor = false; + } + + if (!allow_hide_cursor) { return; } @@ -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 = 1; @@ -227,7 +239,7 @@ static void sdl_grab_end(struct sdl2_console *scon) { SDL_SetWindowGrab(scon->real_window, SDL_FALSE); gui_grab = 0; - sdl_show_cursor(); + sdl_show_cursor(scon); sdl_update_caption(scon); } @@ -658,7 +670,7 @@ static void sdl_mouse_warp(DisplayChangeListener *dcl, 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 = on; guest_x = x, guest_y = y; From patchwork Wed Feb 5 11:03:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11366113 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B4E3292A for ; Wed, 5 Feb 2020 11:09:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8A3872082E for ; Wed, 5 Feb 2020 11:09:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Nv/kUyfL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A3872082E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:45046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izIYu-0005r2-PR for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 06:09:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45856) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izITZ-00053r-LV for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izITY-0000am-KQ for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:09 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:59164 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 1izITY-0000U8-Cz for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580900647; 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=pTrNYiUvQNT+/fzdXbSfIQyC8vcvnbRrhBUzFETpfJc=; b=Nv/kUyfLA24lX2K8Bggr7Uux9hAczWx7OoAvcw8kOg73y+mVhQUAe4UkgtLjPBMkBoueQe 5vmWT81OFCWcJ8Yt00iw7p+YhqPTYi6qHUdXP5+tc6659PMiKtBqhmSmlCvHJOldQVAruj FNYdAmhzi8S3hv/X2bScfRjQNqw71zA= 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-33-Ytts3cYwOKiYcKYivBUtwg-1; Wed, 05 Feb 2020 06:04:03 -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 6D7748C86C5; 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) 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-MC-Unique: Ytts3cYwOKiYcKYivBUtwg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: libvir-list@redhat.com, Markus Armbruster , jpewhacker@gmail.com, Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 = 0; int fd_bootchk = 1; static int no_reboot; int no_shutdown = 0; -int cursor_hide = 1; int graphic_rotate = 0; const char *watchdog; QEMUOptionRom option_rom[MAX_OPTION_ROMS]; @@ -3553,7 +3552,8 @@ int main(int argc, char **argv, char **envp) no_shutdown = 1; break; case QEMU_OPTION_show_cursor: - cursor_hide = 0; + dpy.has_show_cursor = true; + dpy.show_cursor = true; break; case QEMU_OPTION_uuid: if (qemu_uuid_parse(optarg, &qemu_uuid) < 0) { From patchwork Wed Feb 5 11:03:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11366111 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 310C6112B for ; Wed, 5 Feb 2020 11:08:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 08B722082E for ; Wed, 5 Feb 2020 11:08:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iT3+wD8U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 08B722082E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:45026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izIXk-0003cE-7S for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 06:08:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45827) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izITY-00052C-VX for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izITW-0000Q4-KD for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:08 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:34285 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izITW-0000Kk-G3 for qemu-devel@nongnu.org; Wed, 05 Feb 2020 06:04:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580900646; 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=pIWT5ETxxe70P6DNoZLw6kzCewHY5ckuFSWxj8IMGqw=; b=iT3+wD8UN2avynp5DurFlXMJzqczVZ+iR0OcOvQYBO7IHtTKCxOd/mNFqppBaA01Qh7+B+ In6n5RFv28QT7Tt73o3boNdkygUWsUhr6MYSlzNfQ0P7saabPu07UZzu2IRgUo74fzwX5R KSZxrSG0z1a5b5+rgRKBFoUvXos+6Nk= 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-369-7_5KnF6BOvC6B5O5Cv0oJQ-1; Wed, 05 Feb 2020 06:04:04 -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 62F251063BA2; 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) 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-MC-Unique: 7_5KnF6BOvC6B5O5Cv0oJQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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: libvir-list@redhat.com, Markus Armbruster , jpewhacker@gmail.com, Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Gerd Hoffmann Reviewed-by: Ján 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 = 1; break; case QEMU_OPTION_show_cursor: + warn_report("The -show-cursor option is deprecated, " + "use -display {sdl,gtk},show-cursor=on instead"); dpy.has_show_cursor = true; dpy.show_cursor = 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 the size of the translation block cache, @option{-accel tcg,tb-size=}. The new syntax deprecates the previously available @option{-tb-size} option. +@subsection -show-cursor option (since 5.0) + +Use @option{-display sdl,show-cursor=on} or + @option{-display gtk,show-cursor=on} instead. + @section QEMU Machine Protocol (QMP) commands @subsection change (since 2.5.0)