From nobody Tue Nov 4 18:48:59 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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1531161910494964.8758326666518; Mon, 9 Jul 2018 11:45:10 -0700 (PDT) Received: from localhost ([::1]:43892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcb9n-000368-8s for importer@patchew.org; Mon, 09 Jul 2018 14:45:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcb90-0002du-C4 for qemu-devel@nongnu.org; Mon, 09 Jul 2018 14:44:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcb8x-0005rq-5h for qemu-devel@nongnu.org; Mon, 09 Jul 2018 14:44:18 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42508 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fcb8x-0005rg-0o for qemu-devel@nongnu.org; Mon, 09 Jul 2018 14:44:15 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 55E4F808255D for ; Mon, 9 Jul 2018 18:44:14 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-40.ams2.redhat.com [10.36.116.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEFA02156891; Mon, 9 Jul 2018 18:44:12 +0000 (UTC) From: Thomas Huth To: Gerd Hoffmann , qemu-devel@nongnu.org Date: Mon, 9 Jul 2018 20:44:10 +0200 Message-Id: <1531161850-6860-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 09 Jul 2018 18:44:14 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 09 Jul 2018 18:44:14 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'thuth@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH] ui/sdl2: Fix broken -full-screen CLI option 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: , 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" We've got to set the gui_fullscreen variable before creating the SDL2 window, otherwise the initial window will not be created in fullscreen mode. Buglink: https://bugs.launchpad.net/bugs/1780812 Signed-off-by: Thomas Huth --- ui/sdl2.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index 76e5942..01571dc 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -792,6 +792,8 @@ static void sdl2_display_init(DisplayState *ds, Display= Options *o) memset(&info, 0, sizeof(info)); SDL_VERSION(&info.version); =20 + gui_fullscreen =3D o->has_full_screen && o->full_screen; + for (i =3D 0;; i++) { QemuConsole *con =3D qemu_console_lookup_by_index(i); if (!con) { @@ -844,17 +846,14 @@ static void sdl2_display_init(DisplayState *ds, Displ= ayOptions *o) g_free(filename); } =20 - if (sdl2_console->opts->has_full_screen && - sdl2_console->opts->full_screen) { - gui_fullscreen =3D 1; + gui_grab =3D 0; + if (gui_fullscreen) { sdl_grab_start(0); } =20 mouse_mode_notifier.notify =3D sdl_mouse_mode_change; qemu_add_mouse_mode_change_notifier(&mouse_mode_notifier); =20 - gui_grab =3D 0; - sdl_cursor_hidden =3D SDL_CreateCursor(&data, &data, 8, 1, 0, 0); sdl_cursor_normal =3D SDL_GetCursor(); =20 --=20 1.8.3.1