From nobody Wed Nov 5 14:39:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1535018243679787.6689987831547; Thu, 23 Aug 2018 02:57:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6E52E285B0; Thu, 23 Aug 2018 09:57:21 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 351315F90D; Thu, 23 Aug 2018 09:57:21 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D92C1181A139; Thu, 23 Aug 2018 09:57:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7N9v12Q014012 for ; Thu, 23 Aug 2018 05:57:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 11F55A9EFC; Thu, 23 Aug 2018 09:57:01 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-82.ams2.redhat.com [10.36.116.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFDEDA9E66; Thu, 23 Aug 2018 09:57:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B793331E34; Thu, 23 Aug 2018 11:56:53 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 23 Aug 2018 11:56:50 +0200 Message-Id: <20180823095653.14556-10-kraxel@redhat.com> In-Reply-To: <20180823095653.14556-1-kraxel@redhat.com> References: <20180823095653.14556-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, Thomas Huth , Gerd Hoffmann Subject: [libvirt] [PULL 09/12] ui/sdl2: Fix broken -full-screen CLI option X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 23 Aug 2018 09:57:22 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth 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 Message-id: 1531161850-6860-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index 755a7134ff..0a9a18a964 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -790,6 +790,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) { @@ -842,17 +844,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 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list