From nobody Sun May 5 02:49:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1652291522; cv=none; d=zohomail.com; s=zohoarc; b=E5zUovD8upEpccWfFLQWgtz6RlaqvNn53NLNwFEvnZ/7ueKQGiM4K1ofUVStskXquApjyCAgZZZjvWdnYimfzp29TwBYs9inlI5g1ouo6x3KBWYmsPCfiy3hi3zuahjnuA5vfEIiF3wNabQNBwvXFo60Ev/qjqeLuVpqVqqwJ7g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652291522; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ucByN49ZKXpiyo23A22z7u1QCV7sN0pz7kp7jU9Jo5w=; b=AsnonyiGaKi8otfdcfS7YcHR1/LM0Y7kmL0Ofefg22FIha3BcDbtgG/Huj9lfDb9qlAvcFO50MQakebz2rIqdDqGRBIgJk52Mg+2+u+s8UXwW7W0E3kcsdgCVBkeIowtiP5RaHjez3k0K8JzvCiYnRkvbGuMgZmjovO4ma+A5Jw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 165229152276877.59445440036359; Wed, 11 May 2022 10:52:02 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-654-USnAOQkANRaUxszzEGE69A-1; Wed, 11 May 2022 13:51:58 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D23F8185A7B2; Wed, 11 May 2022 17:51:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id BBD8654E891; Wed, 11 May 2022 17:51:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8B567194707A; Wed, 11 May 2022 17:51:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 50D8A1937755 for ; Wed, 11 May 2022 17:51:54 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 22C59400DFBB; Wed, 11 May 2022 17:51:54 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.202]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9633640CF8EB; Wed, 11 May 2022 17:51:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652291521; 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=ucByN49ZKXpiyo23A22z7u1QCV7sN0pz7kp7jU9Jo5w=; b=ZmGZ5SdYixTC6XEL9bXAanxcUrQ+lPjcB/DkD2npkshOuwvvxhK9MqBvdoJbzBxAO7BLim uaHus6ewzKELp6+KBppJFG+JpSzO4nF8Amq9by/bbb09h7fFbyT91w4uYIN/rqVn/+2p8G 0fZT/FRsKIvdh9BOSThxdYSJAlo7dJc= X-MC-Unique: USnAOQkANRaUxszzEGE69A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Thomas Huth To: qemu-devel@nongnu.org, Gerd Hoffmann Subject: [PATCH 1/3] ui: Remove deprecated parameters of the "-display sdl" option Date: Wed, 11 May 2022 19:51:45 +0200 Message-Id: <20220511175147.917707-2-thuth@redhat.com> In-Reply-To: <20220511175147.917707-1-thuth@redhat.com> References: <20220511175147.917707-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Paolo Bonzini , Eric Blake , Markus Armbruster Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652291524932100003 Content-Type: text/plain; charset="utf-8"; x-default="true" These parameters are in the way for further refactoring (since they use an underscore in the name which is forbidden in QAPI), so let's remove these now that their deprecation period is over. Signed-off-by: Thomas Huth Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/about/deprecated.rst | 16 ------------- docs/about/removed-features.rst | 17 ++++++++++++++ softmmu/vl.c | 41 +-------------------------------- qemu-options.hx | 32 ++----------------------- 4 files changed, 20 insertions(+), 86 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 896e5a97ab..ce7a5b97fc 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -109,22 +109,6 @@ other options have been processed. This will either h= ave no effect (if if they were not given. The property is therefore useless and should not = be specified. =20 -``-display sdl,window_close=3D...`` (since 6.1) -''''''''''''''''''''''''''''''''''''''''''''' - -Use ``-display sdl,window-close=3D...`` instead (i.e. with a minus instead= of -an underscore between "window" and "close"). - -``-alt-grab`` and ``-display sdl,alt_grab=3Don`` (since 6.2) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -Use ``-display sdl,grab-mod=3Dlshift-lctrl-lalt`` instead. - -``-ctrl-grab`` and ``-display sdl,ctrl_grab=3Don`` (since 6.2) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -Use ``-display sdl,grab-mod=3Drctrl`` instead. - ``-sdl`` (since 6.2) '''''''''''''''''''' =20 diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.= rst index 4a0b270296..51bfc844f6 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -355,6 +355,23 @@ The ``-writeconfig`` option was not able to serialize = the entire contents of the QEMU command line. It is thus considered a failed experiment and removed without a replacement. =20 +``-display sdl,window_close=3D...`` (removed in 7.1) +'''''''''''''''''''''''''''''''''''''''''''''''''' + +Use ``-display sdl,window-close=3D...`` instead (i.e. with a minus instead= of +an underscore between "window" and "close"). + +``-alt-grab`` and ``-display sdl,alt_grab=3Don`` (removed in 7.1) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Use ``-display sdl,grab-mod=3Dlshift-lctrl-lalt`` instead. + +``-ctrl-grab`` and ``-display sdl,ctrl_grab=3Don`` (removed in 7.1) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Use ``-display sdl,grab-mod=3Drctrl`` instead. + + QEMU Machine Protocol (QMP) commands ------------------------------------ =20 diff --git a/softmmu/vl.c b/softmmu/vl.c index 488cc4d09e..fdf797270c 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -1068,32 +1068,7 @@ static void parse_display(const char *p) } else { goto invalid_sdl_args; } - } else if (strstart(opts, ",alt_grab=3D", &nextopt)) { - opts =3D nextopt; - if (strstart(opts, "on", &nextopt)) { - alt_grab =3D 1; - } else if (strstart(opts, "off", &nextopt)) { - alt_grab =3D 0; - } else { - goto invalid_sdl_args; - } - warn_report("alt_grab is deprecated, use grab-mod instead.= "); - } else if (strstart(opts, ",ctrl_grab=3D", &nextopt)) { - opts =3D nextopt; - if (strstart(opts, "on", &nextopt)) { - ctrl_grab =3D 1; - } else if (strstart(opts, "off", &nextopt)) { - ctrl_grab =3D 0; - } else { - goto invalid_sdl_args; - } - warn_report("ctrl_grab is deprecated, use grab-mod instead= ."); - } else if (strstart(opts, ",window_close=3D", &nextopt) || - strstart(opts, ",window-close=3D", &nextopt)) { - if (strstart(opts, ",window_close=3D", NULL)) { - warn_report("window_close with an underscore is deprec= ated," - " please use window-close instead."); - } + } else if (strstart(opts, ",window-close=3D", &nextopt)) { opts =3D nextopt; dpy.has_window_close =3D true; if (strstart(opts, "on", &nextopt)) { @@ -1943,10 +1918,6 @@ static void qemu_create_early_backends(void) const bool use_gtk =3D false; #endif =20 - if ((alt_grab || ctrl_grab) && !use_sdl) { - error_report("-alt-grab and -ctrl-grab are only valid " - "for SDL, ignoring option"); - } if (dpy.has_window_close && !use_gtk && !use_sdl) { error_report("window-close is only valid for GTK and SDL, " "ignoring option"); @@ -3302,16 +3273,6 @@ void qemu_init(int argc, char **argv, char **envp) dpy.has_full_screen =3D true; dpy.full_screen =3D true; break; - case QEMU_OPTION_alt_grab: - alt_grab =3D 1; - warn_report("-alt-grab is deprecated, please use " - "-display sdl,grab-mod=3Dlshift-lctrl-lalt ins= tead."); - break; - case QEMU_OPTION_ctrl_grab: - ctrl_grab =3D 1; - warn_report("-ctrl-grab is deprecated, please use " - "-display sdl,grab-mod=3Drctrl instead."); - break; case QEMU_OPTION_sdl: warn_report("-sdl is deprecated, use -display sdl instead.= "); #ifdef CONFIG_SDL diff --git a/qemu-options.hx b/qemu-options.hx index 796229c433..0fa873d088 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1903,8 +1903,8 @@ DEF("display", HAS_ARG, QEMU_OPTION_display, "-display spice-app[,gl=3Don|off]\n" #endif #if defined(CONFIG_SDL) - "-display sdl[,alt_grab=3Don|off][,ctrl_grab=3Don|off][,gl=3Don|core|e= s|off]\n" - " [,grab-mod=3D][,show-cursor=3Don|off][,window-close= =3Don|off]\n" + "-display sdl[,gl=3Don|core|es|off][,grab-mod=3D][,show-cursor=3D= on|off]\n" + " [,window-close=3Don|off]\n" #endif #if defined(CONFIG_GTK) "-display gtk[,full-screen=3Don|off][,gl=3Don|off][,grab-on-hover=3Don= |off]\n" @@ -1977,12 +1977,6 @@ SRST the mouse grabbing in conjunction with the "g" key. ```` can= be either ``lshift-lctrl-lalt`` or ``rctrl``. =20 - ``alt_grab=3Don|off`` : Use Control+Alt+Shift-g to toggle mouse gr= abbing. - This parameter is deprecated - use ``grab-mod`` instead. - - ``ctrl_grab=3Don|off`` : Use Right-Control-g to toggle mouse grabb= ing. - This parameter is deprecated - use ``grab-mod`` instead. - ``gl=3Don|off|core|es`` : Use OpenGL for displaying =20 ``show-cursor=3Don|off`` : Force showing the mouse cursor @@ -2068,28 +2062,6 @@ SRST is displayed in graphical mode. ERST =20 -DEF("alt-grab", 0, QEMU_OPTION_alt_grab, - "-alt-grab use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt= )\n", - QEMU_ARCH_ALL) -SRST -``-alt-grab`` - Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt). Note that - this also affects the special keys (for fullscreen, monitor-mode - switching, etc). This option is deprecated - please use - ``-display sdl,grab-mod=3Dlshift-lctrl-lalt`` instead. -ERST - -DEF("ctrl-grab", 0, QEMU_OPTION_ctrl_grab, - "-ctrl-grab use Right-Ctrl to grab mouse (instead of Ctrl-Alt)\n", - QEMU_ARCH_ALL) -SRST -``-ctrl-grab`` - Use Right-Ctrl to grab mouse (instead of Ctrl-Alt). Note that this - also affects the special keys (for fullscreen, monitor-mode - switching, etc). This option is deprecated - please use - ``-display sdl,grab-mod=3Drctrl`` instead. -ERST - DEF("sdl", 0, QEMU_OPTION_sdl, "-sdl shorthand for -display sdl\n", QEMU_ARCH_ALL) SRST --=20 2.27.0 From nobody Sun May 5 02:49:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1652291525; cv=none; d=zohomail.com; s=zohoarc; b=cVcS8YzuIEWnJ87EXQxHNt5QX2/K9kcdyqfG+VZL3g+qpoWYl5u11twQz1qY5oOIpzs2qZNleNarQVeZLbvaVGheXAElMvNBWPzq3xja4juHgqdlyxH/vW0a9ZyLONss59MyUYvIDYbXOeOaXz/uG2Pd2aT9CCVPtLcLZNDKUs8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652291525; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7vHNTpZp+aJW+NFWmBiJyOFUdNmlx3lbxDvIdtsf2AA=; b=iRX4sdyEOS3GoLcsBULqb+e08y5IDA2GEBDjRM0NkPqmVJJTMxTrjaT7m1u5MWz6fXyBH0B/6wAYsMJRSKb8M1iMy77MYFcLbYfc5k8pY6rgiLU0t6vaSVAB8n3UM/+J4j53xYzdEC2A8M7QRpdViFvOAMEo7OKrPApXOAgb5xc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1652291525303763.9710648181846; Wed, 11 May 2022 10:52:05 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-195-D_TAH428PkG7g14AfnWcww-1; Wed, 11 May 2022 13:51:59 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 167B41D96CA1; Wed, 11 May 2022 17:51:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 019502026D6A; Wed, 11 May 2022 17:51:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C5511194707A; Wed, 11 May 2022 17:51:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 318391947041 for ; Wed, 11 May 2022 17:51:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 02B1640CF8FD; Wed, 11 May 2022 17:51:56 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.202]) by smtp.corp.redhat.com (Postfix) with ESMTP id 71F9340CF8E4; Wed, 11 May 2022 17:51:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652291523; 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=7vHNTpZp+aJW+NFWmBiJyOFUdNmlx3lbxDvIdtsf2AA=; b=AwkxQTqVTjJFp3cziOJ2BEGvK4UvxKpDsqCbU8lZKxLaZ+2yhfZW3fUUMCaommlMSg9S2u TyBTrfA/uALdstpqGCY0+/kKve4D5PbtwN58FGI/5WjQxuWkKaNEUVVikKEGpJJTEGgAgZ S6DXAbDrGKybL6iX2KPuOZDQHFCzguQ= X-MC-Unique: D_TAH428PkG7g14AfnWcww-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Thomas Huth To: qemu-devel@nongnu.org, Gerd Hoffmann Subject: [PATCH 2/3] ui: Switch "-display sdl" to use the QAPI parser Date: Wed, 11 May 2022 19:51:46 +0200 Message-Id: <20220511175147.917707-3-thuth@redhat.com> In-Reply-To: <20220511175147.917707-1-thuth@redhat.com> References: <20220511175147.917707-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Paolo Bonzini , Eric Blake , Markus Armbruster Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652291526877100005 Content-Type: text/plain; charset="utf-8"; x-default="true" The "-display sdl" option still uses a hand-crafted parser for its parameters since some of them used underscores which is forbidden in QAPI. Now that the problematic parameters have been removed, we can switch to use the QAPI parser instead. This introduces the new "DisplaySDL" QAPI struct that is used to hold the parameters that are unique to the SDL display. The only specific parameter is currently "grab-mod" which is modeled as a string, so that it could be extended for other arbitrary modifiers later more easily. Signed-off-by: Thomas Huth Reviewed-by: Daniel P. Berrang=C3=A9 --- qapi/ui.json | 17 +++++++++- include/sysemu/sysemu.h | 2 -- softmmu/globals.c | 2 -- softmmu/vl.c | 70 +---------------------------------------- ui/sdl2.c | 13 ++++++++ 5 files changed, 30 insertions(+), 74 deletions(-) diff --git a/qapi/ui.json b/qapi/ui.json index 059302a5ef..511ade44f2 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1309,6 +1309,20 @@ '*swap-opt-cmd': 'bool' } } =20 +## +# @DisplaySDL: +# +# SDL2 display options. +# +# @grab-mod: String with modifier keys that should be pressed together wi= th +# the "G" key to release the mouse grab. Only "lshift-lctrl-la= lt" +# and "rctrl" are currently supported. +# +# Since: 7.1 +## +{ 'struct' : 'DisplaySDL', + 'data' : { '*grab-mod' : 'str' } } + ## # @DisplayType: # @@ -1391,7 +1405,8 @@ 'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' }, 'egl-headless': { 'type': 'DisplayEGLHeadless', 'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } }, - 'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' } + 'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' }, + 'sdl': { 'type': 'DisplaySDL', 'if': 'CONFIG_SDL' } } } =20 diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 360a408edf..7cca797450 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -42,8 +42,6 @@ extern int graphic_depth; extern int display_opengl; extern const char *keyboard_layout; extern int win2k_install_hack; -extern int alt_grab; -extern int ctrl_grab; extern int graphic_rotate; extern int old_param; extern int boot_menu; diff --git a/softmmu/globals.c b/softmmu/globals.c index 98b64e0492..12611c2a7a 100644 --- a/softmmu/globals.c +++ b/softmmu/globals.c @@ -50,8 +50,6 @@ QEMUOptionRom option_rom[MAX_OPTION_ROMS]; int nb_option_roms; int old_param; const char *qemu_name; -int alt_grab; -int ctrl_grab; unsigned int nb_prom_envs; const char *prom_envs[MAX_PROM_ENVS]; int boot_menu; diff --git a/softmmu/vl.c b/softmmu/vl.c index fdf797270c..90a0a4d393 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -1045,75 +1045,7 @@ static void parse_display(const char *p) exit(0); } =20 - if (strstart(p, "sdl", &opts)) { - /* - * sdl DisplayType needs hand-crafted parser instead of - * parse_display_qapi() due to some options not in - * DisplayOptions, specifically: - * - ctrl_grab + alt_grab - * They can't be moved into the QAPI since they use underscore= s, - * thus they will get replaced by "grab-mod" in the long term - */ -#if defined(CONFIG_SDL) - dpy.type =3D DISPLAY_TYPE_SDL; - while (*opts) { - const char *nextopt; - - if (strstart(opts, ",grab-mod=3D", &nextopt)) { - opts =3D nextopt; - if (strstart(opts, "lshift-lctrl-lalt", &nextopt)) { - alt_grab =3D 1; - } else if (strstart(opts, "rctrl", &nextopt)) { - ctrl_grab =3D 1; - } else { - goto invalid_sdl_args; - } - } else if (strstart(opts, ",window-close=3D", &nextopt)) { - opts =3D nextopt; - dpy.has_window_close =3D true; - if (strstart(opts, "on", &nextopt)) { - dpy.window_close =3D true; - } else if (strstart(opts, "off", &nextopt)) { - dpy.window_close =3D false; - } 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; - if (strstart(opts, "on", &nextopt)) { - dpy.gl =3D DISPLAYGL_MODE_ON; - } else if (strstart(opts, "core", &nextopt)) { - dpy.gl =3D DISPLAYGL_MODE_CORE; - } else if (strstart(opts, "es", &nextopt)) { - dpy.gl =3D DISPLAYGL_MODE_ES; - } else if (strstart(opts, "off", &nextopt)) { - dpy.gl =3D DISPLAYGL_MODE_OFF; - } else { - goto invalid_sdl_args; - } - } else { - invalid_sdl_args: - error_report("invalid SDL option string"); - exit(1); - } - opts =3D nextopt; - } -#else - error_report("SDL display supported is not available in this binar= y"); - exit(1); -#endif - } else if (strstart(p, "vnc", &opts)) { + if (strstart(p, "vnc", &opts)) { /* * vnc isn't a (local) DisplayType but a protocol for remote * display access. diff --git a/ui/sdl2.c b/ui/sdl2.c index d3741f9b75..18c63e1fc9 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -40,6 +40,8 @@ static struct sdl2_console *sdl2_console; =20 static SDL_Surface *guest_sprite_surface; static int gui_grab; /* if true, all keyboard/mouse events are grabbed */ +static bool alt_grab; +static bool ctrl_grab; =20 static int gui_saved_grab; static int gui_fullscreen; @@ -853,6 +855,17 @@ static void sdl2_display_init(DisplayState *ds, Displa= yOptions *o) =20 gui_fullscreen =3D o->has_full_screen && o->full_screen; =20 + if (o->u.sdl.has_grab_mod) { + if (g_str_equal(o->u.sdl.grab_mod, "lshift-lctrl-lalt")) { + alt_grab =3D true; + } else if (g_str_equal(o->u.sdl.grab_mod, "rctrl")) { + ctrl_grab =3D true; + } else { + error_report("Unsupported grab-mod: %s", o->u.sdl.grab_mod); + exit(1); + } + } + for (i =3D 0;; i++) { QemuConsole *con =3D qemu_console_lookup_by_index(i); if (!con) { --=20 2.27.0 From nobody Sun May 5 02:49:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1652291527; cv=none; d=zohomail.com; s=zohoarc; b=iHRnrqDJ7L/A726Ov1UrA/KMAov89GylqjnEV8MnXguZjv/LQDTZMGm/LOaIipHqINdRAV3sueJZR4Ymu5JIALIlkZhx4mWS+eRWFBaEMim8BK5nizf+gIXoFf2caBA4XWl+39KyHmv8nHm7HnROhVXTGzzGVm5UMm2GEsfr3jw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652291527; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=w1Qa8eWiKw7oxT4a4786YMEFlQyElPX/kzcM6YGI3EA=; b=lH/d29L6po/uLwObvFSuWQbShJpcjluE24sa2tfhlf7zGiUcLPdd4ueWKYp9axjmjrmqTSz8rJAG5NDOZa7bRCcZ7zZ/Gxyrz1q+Dt0J2gOwyuF2Vf6LzH9QwLXdwP45N/3XpLR/ThZ4ClBquVGcf8DnUsCrWUsypZBl6I/1s80= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 16522915275641016.3447763165171; Wed, 11 May 2022 10:52:07 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-85-bYsDwTSzORqfjBX6Xp8Wgw-1; Wed, 11 May 2022 13:52:03 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 55BEF2932489; Wed, 11 May 2022 17:52:00 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F54D416385; Wed, 11 May 2022 17:51:59 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 159CB194707A; Wed, 11 May 2022 17:51:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0A4821947041 for ; Wed, 11 May 2022 17:51:58 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E1D8D40CF8EE; Wed, 11 May 2022 17:51:57 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.202]) by smtp.corp.redhat.com (Postfix) with ESMTP id 59A2B400E872; Wed, 11 May 2022 17:51:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652291526; 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=w1Qa8eWiKw7oxT4a4786YMEFlQyElPX/kzcM6YGI3EA=; b=G5SBGWVIDFTMGIvzKlWm5WX4dU7J+oLgekKkfW9sdr9O3gUwpt9wVoGmBV2kkqBJQLryUG BDpqnboOV3R1O+ICJtnCK9bVFUfnb1sJELFp73tjOOyZQnvVW5GrH+l/iCnHi+BgjZWB/j 8p70BGRDqSV6lH0HrAaapc7PjI7sIGo= X-MC-Unique: bYsDwTSzORqfjBX6Xp8Wgw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Thomas Huth To: qemu-devel@nongnu.org, Gerd Hoffmann Subject: [PATCH 3/3] ui: Remove deprecated options "-sdl" and "-curses" Date: Wed, 11 May 2022 19:51:47 +0200 Message-Id: <20220511175147.917707-4-thuth@redhat.com> In-Reply-To: <20220511175147.917707-1-thuth@redhat.com> References: <20220511175147.917707-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Paolo Bonzini , Eric Blake , Markus Armbruster Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652291528898100007 Content-Type: text/plain; charset="utf-8"; x-default="true" We have "-sdl" and "-curses", but no "-gtk" and no "-cocoa" ... these old-style options are rather confusing than helpful nowadays. Now that the deprecation period is over, let's remove them, so we get a cleaner interface (where "-display" is the only way to select the user interface). Signed-off-by: Thomas Huth Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/about/deprecated.rst | 10 ---------- docs/about/removed-features.rst | 10 ++++++++++ softmmu/vl.c | 19 ------------------- qemu-options.hx | 24 ++---------------------- 4 files changed, 12 insertions(+), 51 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index ce7a5b97fc..0ed0e9cb13 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -109,16 +109,6 @@ other options have been processed. This will either h= ave no effect (if if they were not given. The property is therefore useless and should not = be specified. =20 -``-sdl`` (since 6.2) -'''''''''''''''''''' - -Use ``-display sdl`` instead. - -``-curses`` (since 6.2) -''''''''''''''''''''''' - -Use ``-display curses`` instead. - ``-watchdog`` (since 6.2) ''''''''''''''''''''''''' =20 diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.= rst index 51bfc844f6..0d5ffb353e 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -371,6 +371,16 @@ Use ``-display sdl,grab-mod=3Dlshift-lctrl-lalt`` inst= ead. =20 Use ``-display sdl,grab-mod=3Drctrl`` instead. =20 +``-sdl`` (removed in 7.1) +''''''''''''''''''''''''' + +Use ``-display sdl`` instead. + +``-curses`` (removed in 7.1) +'''''''''''''''''''''''''''' + +Use ``-display curses`` instead. + =20 QEMU Machine Protocol (QMP) commands ------------------------------------ diff --git a/softmmu/vl.c b/softmmu/vl.c index 90a0a4d393..9887c71791 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2845,16 +2845,6 @@ void qemu_init(int argc, char **argv, char **envp) nographic =3D true; dpy.type =3D DISPLAY_TYPE_NONE; break; - case QEMU_OPTION_curses: - warn_report("-curses is deprecated, " - "use -display curses instead."); -#ifdef CONFIG_CURSES - dpy.type =3D DISPLAY_TYPE_CURSES; -#else - error_report("curses or iconv support is disabled"); - exit(1); -#endif - break; case QEMU_OPTION_portrait: graphic_rotate =3D 90; break; @@ -3205,15 +3195,6 @@ void qemu_init(int argc, char **argv, char **envp) dpy.has_full_screen =3D true; dpy.full_screen =3D true; break; - case QEMU_OPTION_sdl: - warn_report("-sdl is deprecated, use -display sdl instead.= "); -#ifdef CONFIG_SDL - dpy.type =3D DISPLAY_TYPE_SDL; - break; -#else - error_report("SDL support is disabled"); - exit(1); -#endif case QEMU_OPTION_pidfile: pid_file =3D optarg; break; diff --git a/qemu-options.hx b/qemu-options.hx index 0fa873d088..1abf3e500f 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1946,9 +1946,8 @@ DEF("display", HAS_ARG, QEMU_OPTION_display, , QEMU_ARCH_ALL) SRST ``-display type`` - Select type of display to use. This option is a replacement for the - old style -sdl/-curses/... options. Use ``-display help`` to list - the available display types. Valid values for type are + Select type of display to use. Use ``-display help`` to list the avail= able + display types. Valid values for type are =20 ``spice-app[,gl=3Don|off]`` Start QEMU as a Spice server and launch the default Spice client @@ -2050,25 +2049,6 @@ SRST Use C-a h for help on switching between the console and monitor. ERST =20 -DEF("curses", 0, QEMU_OPTION_curses, - "-curses shorthand for -display curses\n", - QEMU_ARCH_ALL) -SRST -``-curses`` - Normally, if QEMU is compiled with graphical window support, it - displays output such as guest graphics, guest console, and the QEMU - monitor in a window. With this option, QEMU can display the VGA - output when in text mode using a curses/ncurses interface. Nothing - is displayed in graphical mode. -ERST - -DEF("sdl", 0, QEMU_OPTION_sdl, - "-sdl shorthand for -display sdl\n", QEMU_ARCH_ALL) -SRST -``-sdl`` - Enable SDL. -ERST - #ifdef CONFIG_SPICE DEF("spice", HAS_ARG, QEMU_OPTION_spice, "-spice [port=3Dport][,tls-port=3Dsecured-port][,x509-dir=3D]\n" --=20 2.27.0