From nobody Sat Nov 1 22:28:28 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1509710625188138.16420100026835; Fri, 3 Nov 2017 05:03:45 -0700 (PDT) Received: from localhost ([::1]:36227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAahC-0002me-A6 for importer@patchew.org; Fri, 03 Nov 2017 08:03:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAach-0007pN-FP for qemu-devel@nongnu.org; Fri, 03 Nov 2017 07:58:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAacc-000671-Ht for qemu-devel@nongnu.org; Fri, 03 Nov 2017 07:58:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34438) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eAacc-00065Y-9M for qemu-devel@nongnu.org; Fri, 03 Nov 2017 07:58:50 -0400 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 mx1.redhat.com (Postfix) with ESMTPS id 146396A7C6 for ; Fri, 3 Nov 2017 11:58:49 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-41.ams2.redhat.com [10.36.116.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEE4D60C8D; Fri, 3 Nov 2017 11:58:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A7B6A388; Fri, 3 Nov 2017 12:58:42 +0100 (CET) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 146396A7C6 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kraxel@redhat.com From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 3 Nov 2017 12:58:40 +0100 Message-Id: <20171103115842.1534-2-kraxel@redhat.com> In-Reply-To: <20171103115842.1534-1-kraxel@redhat.com> References: <20171103115842.1534-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 03 Nov 2017 11:58:49 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/3] sdl: remove -no-frame support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" SDL2 doesn't support this any more, the SDL_NOFRAME window flag is gone. Drop the code, print a notice when the option is still used. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 5 ++--- ui/sdl.c | 8 +------- ui/sdl2.c | 7 +------ vl.c | 15 ++++----------- 4 files changed, 8 insertions(+), 27 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 580dfc57ee..7b35778444 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -436,7 +436,7 @@ void surface_gl_setup_viewport(QemuGLShader *gls, /* sdl.c */ #ifdef CONFIG_SDL void sdl_display_early_init(int opengl); -void sdl_display_init(DisplayState *ds, int full_screen, int no_frame); +void sdl_display_init(DisplayState *ds, int full_screen); #else static inline void sdl_display_early_init(int opengl) { @@ -444,8 +444,7 @@ static inline void sdl_display_early_init(int opengl) error_report("SDL support is disabled"); abort(); } -static inline void sdl_display_init(DisplayState *ds, int full_screen, - int no_frame) +static inline void sdl_display_init(DisplayState *ds, int full_screen) { /* This must never be called if CONFIG_SDL is disabled */ error_report("SDL support is disabled"); diff --git a/ui/sdl.c b/ui/sdl.c index 7b71a9ac58..f3adbb7a64 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -48,7 +48,6 @@ static int gui_saved_width; static int gui_saved_height; static int gui_saved_grab; static int gui_fullscreen; -static int gui_noframe; static int gui_key_modifier_pressed; static int gui_keysym; static int gui_grab_code =3D KMOD_LALT | KMOD_LCTRL; @@ -114,8 +113,6 @@ static void do_sdl_resize(int width, int height, int bp= p) } else { flags |=3D SDL_RESIZABLE; } - if (gui_noframe) - flags |=3D SDL_NOFRAME; =20 tmp_screen =3D SDL_SetVideoMode(width, height, bpp, flags); if (!real_screen) { @@ -944,7 +941,7 @@ void sdl_display_early_init(int opengl) } } =20 -void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) +void sdl_display_init(DisplayState *ds, int full_screen) { int flags; uint8_t data =3D 0; @@ -963,9 +960,6 @@ void sdl_display_init(DisplayState *ds, int full_screen= , int no_frame) exit(1); } =20 - if (no_frame) - gui_noframe =3D 1; - if (!full_screen) { setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0); } diff --git a/ui/sdl2.c b/ui/sdl2.c index 53dd447fd2..3802a9b477 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -38,7 +38,6 @@ static int gui_grab; /* if true, all keyboard/mouse event= s are grabbed */ =20 static int gui_saved_grab; static int gui_fullscreen; -static int gui_noframe; static int gui_key_modifier_pressed; static int gui_keysym; static int gui_grab_code =3D KMOD_LALT | KMOD_LCTRL; @@ -756,7 +755,7 @@ void sdl_display_early_init(int opengl) } } =20 -void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) +void sdl_display_init(DisplayState *ds, int full_screen) { int flags; uint8_t data =3D 0; @@ -764,10 +763,6 @@ void sdl_display_init(DisplayState *ds, int full_scree= n, int no_frame) int i; SDL_SysWMinfo info; =20 - if (no_frame) { - gui_noframe =3D 1; - } - #ifdef __linux__ /* on Linux, SDL may use fbcon|directfb|svgalib when run without * accessible $DISPLAY to open X11 window. This is often the case diff --git a/vl.c b/vl.c index ec299099ff..0065161240 100644 --- a/vl.c +++ b/vl.c @@ -151,7 +151,6 @@ static int rtc_date_offset =3D -1; /* -1 means no chang= e */ QEMUClockType rtc_clock; int vga_interface_type =3D VGA_NONE; static int full_screen =3D 0; -static int no_frame =3D 0; int no_quit =3D 0; static bool grab_on_hover; Chardev *serial_hds[MAX_SERIAL_PORTS]; @@ -2165,13 +2164,7 @@ static DisplayType select_display(const char *p) =20 if (strstart(opts, ",frame=3D", &nextopt)) { opts =3D nextopt; - if (strstart(opts, "on", &nextopt)) { - no_frame =3D 0; - } else if (strstart(opts, "off", &nextopt)) { - no_frame =3D 1; - } else { - goto invalid_sdl_args; - } + warn_report("frame sdl option is unsupported, ignoring"); } else if (strstart(opts, ",alt_grab=3D", &nextopt)) { opts =3D nextopt; if (strstart(opts, "on", &nextopt)) { @@ -3784,7 +3777,7 @@ int main(int argc, char **argv, char **envp) full_screen =3D 1; break; case QEMU_OPTION_no_frame: - no_frame =3D 1; + warn_report("-no-frame switch is unsupported, ignoring"); break; case QEMU_OPTION_alt_grab: alt_grab =3D 1; @@ -4458,7 +4451,7 @@ int main(int argc, char **argv, char **envp) #endif } =20 - if ((no_frame || alt_grab || ctrl_grab) && display_type !=3D DT_SDL) { + if ((alt_grab || ctrl_grab) && display_type !=3D DT_SDL) { error_report("-no-frame, -alt-grab and -ctrl-grab are only valid " "for SDL, ignoring option"); } @@ -4809,7 +4802,7 @@ int main(int argc, char **argv, char **envp) curses_display_init(ds, full_screen); break; case DT_SDL: - sdl_display_init(ds, full_screen, no_frame); + sdl_display_init(ds, full_screen); break; case DT_COCOA: cocoa_display_init(ds, full_screen); --=20 2.9.3