[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/40] ui: Fix the "-display sdl,window_close=..." parameter
From: |
Paolo Bonzini |
Subject: |
[PULL 03/40] ui: Fix the "-display sdl,window_close=..." parameter |
Date: |
Tue, 6 Jul 2021 12:01:04 +0200 |
From: Thomas Huth <thuth@redhat.com>
According to the QAPI schema, there is a "-" and not a "_" between
"window" and "close", and we're also talking about "window-close"
in the long parameter description in qemu-options.hx, so we should
make sure that we rather use the variant with the "-" by default
instead of only allowing the one with the "_" here. The old way
still stays enabled for compatibility, but we deprecate it, so that
we can switch to a QAPIfied parameter one day more easily.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210630163231.467987-3-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
docs/system/deprecated.rst | 6 ++++++
qemu-options.hx | 2 +-
softmmu/vl.c | 7 ++++++-
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index e2e0090878..bb624d3170 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -126,6 +126,12 @@ other options have been processed. This will either have
no effect (if
if they were not given. The property is therefore useless and should not be
specified.
+``-display sdl,window_close=...`` (since 6.1)
+'''''''''''''''''''''''''''''''''''''''''''''
+
+Use ``-display sdl,window-close=...`` instead (i.e. with a minus instead of
+an underscore between "window" and "close").
+
QEMU Machine Protocol (QMP) commands
------------------------------------
diff --git a/qemu-options.hx b/qemu-options.hx
index ba3ca9da1d..ae56fa4f28 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1784,7 +1784,7 @@ DEF("display", HAS_ARG, QEMU_OPTION_display,
#endif
#if defined(CONFIG_SDL)
"-display sdl[,alt_grab=on|off][,ctrl_grab=on|off]\n"
- " [,window_close=on|off][,gl=on|core|es|off]\n"
+ " [,window-close=on|off][,gl=on|core|es|off]\n"
#endif
#if defined(CONFIG_GTK)
"-display gtk[,grab_on_hover=on|off][,gl=on|off]|\n"
diff --git a/softmmu/vl.c b/softmmu/vl.c
index cee6339580..36b761677d 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -1089,7 +1089,12 @@ static void parse_display(const char *p)
} else {
goto invalid_sdl_args;
}
- } else if (strstart(opts, ",window_close=", &nextopt)) {
+ } else if (strstart(opts, ",window_close=", &nextopt) ||
+ strstart(opts, ",window-close=", &nextopt)) {
+ if (strstart(opts, ",window_close=", NULL)) {
+ warn_report("window_close with an underscore is
deprecated,"
+ " please use window-close instead.");
+ }
opts = nextopt;
dpy.has_window_close = true;
if (strstart(opts, "on", &nextopt)) {
--
2.31.1
- [PULL 00/40] Misc patches for 2021-07-06, Paolo Bonzini, 2021/07/06
- [PULL 04/40] ui: Mark the '-no-quit' option as deprecated, Paolo Bonzini, 2021/07/06
- [PULL 03/40] ui: Fix the "-display sdl,window_close=..." parameter,
Paolo Bonzini <=
- [PULL 02/40] softmmu/vl: Remove obsolete comment about the "frame" parameter, Paolo Bonzini, 2021/07/06
- [PULL 05/40] qemu-options: Improve the documentation of the -display options, Paolo Bonzini, 2021/07/06
- [PULL 07/40] coverity-scan: switch to vpath build, Paolo Bonzini, 2021/07/06
- [PULL 06/40] coverity-scan: Remove lm32 / unicore32 targets, Paolo Bonzini, 2021/07/06
- [PULL 10/40] target/i386: Clarify the padding requirements of X86XSaveArea, Paolo Bonzini, 2021/07/06
- [PULL 11/40] target/i386: Pass buffer and length to XSAVE helper, Paolo Bonzini, 2021/07/06
- [PULL 12/40] target/i386: Make x86_ext_save_areas visible outside cpu.c, Paolo Bonzini, 2021/07/06
- [PULL 09/40] target/i386: Consolidate the X86XSaveArea offset checks, Paolo Bonzini, 2021/07/06
- [PULL 13/40] target/i386: Observe XSAVE state area offsets, Paolo Bonzini, 2021/07/06
- [PULL 08/40] target/i386: Declare constants for XSAVE offsets, Paolo Bonzini, 2021/07/06