From nobody Sun May 5 16:57:04 2024 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1510913508839183.4781529549556; Fri, 17 Nov 2017 02:11:48 -0800 (PST) Received: from localhost ([::1]:44865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFdch-0001lH-SW for importer@patchew.org; Fri, 17 Nov 2017 05:11:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFdY4-0006eP-BK for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:07:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFdY1-00063O-5m for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:07:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59548) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eFdY0-00060p-Vf for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:06:57 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B532C04AC54; Fri, 17 Nov 2017 10:06:56 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-103.ams2.redhat.com [10.36.116.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id DAFDF83CA3; Fri, 17 Nov 2017 10:06:53 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 21B5BECE; Fri, 17 Nov 2017 11:06:53 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 17 Nov 2017 11:06:49 +0100 Message-Id: <20171117100653.13015-2-kraxel@redhat.com> In-Reply-To: <20171117100653.13015-1-kraxel@redhat.com> References: <20171117100653.13015-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 17 Nov 2017 10:06:56 +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] [PULL 1/5] sdl2: Do not quit the emulator when an auxilliary window is closed 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: Jindrich Makovicka , 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" From: Jindrich Makovicka Signed-off-by: Jindrich Makovicka Message-Id: <20171112193032.9724-3-makovick@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index 53dd447fd2..05729af971 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -566,9 +566,14 @@ static void handle_windowevent(SDL_Event *ev) update_displaychangelistener(&scon->dcl, 500); break; case SDL_WINDOWEVENT_CLOSE: - if (!no_quit) { - no_shutdown =3D 0; - qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI); + if (qemu_console_is_graphic(scon->dcl.con)) { + if (!no_quit) { + no_shutdown =3D 0; + qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI); + } + } else { + SDL_HideWindow(scon->real_window); + scon->hidden =3D true; } break; case SDL_WINDOWEVENT_SHOWN: --=20 2.9.3 From nobody Sun May 5 16:57:04 2024 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 1510913354923370.57799713622205; Fri, 17 Nov 2017 02:09:14 -0800 (PST) Received: from localhost ([::1]:44844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFda3-0007l0-Us for importer@patchew.org; Fri, 17 Nov 2017 05:09:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFdY4-0006eT-Cj for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:07:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFdY1-00064F-QU for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:07:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33316) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eFdY1-000637-Jj for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:06:57 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C11436267F; Fri, 17 Nov 2017 10:06:56 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-103.ams2.redhat.com [10.36.116.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5B715C54F; Fri, 17 Nov 2017 10:06:53 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2920831FD5; Fri, 17 Nov 2017 11:06:53 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 17 Nov 2017 11:06:50 +0100 Message-Id: <20171117100653.13015-3-kraxel@redhat.com> In-Reply-To: <20171117100653.13015-1-kraxel@redhat.com> References: <20171117100653.13015-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 17 Nov 2017 10:06:56 +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] [PULL 2/5] sdl2: Use the same pointer show/hide logic for absolute and relative mode 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: Jindrich Makovicka , 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" From: Jindrich Makovicka Also use a proper enum parameter for SDL_ShowCursor Signed-off-by: Jindrich Makovicka Message-Id: <20171112193032.9724-4-makovick@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index 05729af971..d0f16f60f4 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -169,10 +169,10 @@ static void sdl_hide_cursor(void) return; } =20 - if (qemu_input_is_absolute()) { - SDL_ShowCursor(1); - SDL_SetCursor(sdl_cursor_hidden); - } else { + SDL_ShowCursor(SDL_DISABLE); + SDL_SetCursor(sdl_cursor_hidden); + + if (!qemu_input_is_absolute()) { SDL_SetRelativeMouseMode(SDL_TRUE); } } @@ -185,14 +185,16 @@ static void sdl_show_cursor(void) =20 if (!qemu_input_is_absolute()) { SDL_SetRelativeMouseMode(SDL_FALSE); - SDL_ShowCursor(1); - if (guest_cursor && - (gui_grab || qemu_input_is_absolute() || absolute_enabled)) { - SDL_SetCursor(guest_sprite); - } else { - SDL_SetCursor(sdl_cursor_normal); - } } + + if (guest_cursor && + (gui_grab || qemu_input_is_absolute() || absolute_enabled)) { + SDL_SetCursor(guest_sprite); + } else { + SDL_SetCursor(sdl_cursor_normal); + } + + SDL_ShowCursor(SDL_ENABLE); } =20 static void sdl_grab_start(struct sdl2_console *scon) --=20 2.9.3 From nobody Sun May 5 16:57:04 2024 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 1510913350744439.51767999604874; Fri, 17 Nov 2017 02:09:10 -0800 (PST) Received: from localhost ([::1]:44845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFda4-0007n5-SJ for importer@patchew.org; Fri, 17 Nov 2017 05:09:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFdY4-0006eR-BM for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:07:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFdY1-00063b-6E for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:07:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37108) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eFdY1-00060r-06 for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:06:57 -0500 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 1B3BC81DF6; Fri, 17 Nov 2017 10:06:56 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-103.ams2.redhat.com [10.36.116.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id DE88411A2AD; Fri, 17 Nov 2017 10:06:53 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 305A23F139; Fri, 17 Nov 2017 11:06:53 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 17 Nov 2017 11:06:51 +0100 Message-Id: <20171117100653.13015-4-kraxel@redhat.com> In-Reply-To: <20171117100653.13015-1-kraxel@redhat.com> References: <20171117100653.13015-1-kraxel@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.25]); Fri, 17 Nov 2017 10:06:56 +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] [PULL 3/5] sdl2: Fix dead keyboard after fullsceen 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: Jindrich Makovicka , 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" From: Jindrich Makovicka Signed-off-by: Jindrich Makovicka Message-Id: <20171112193032.9724-7-makovick@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index d0f16f60f4..cf05214f97 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -442,6 +442,7 @@ static void handle_keyup(SDL_Event *ev) sdl2_reset_keys(scon); return; } + sdl2_reset_keys(scon); gui_keysym =3D 0; } if (!gui_keysym) { --=20 2.9.3 From nobody Sun May 5 16:57:04 2024 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 1510913351834391.42022258377744; Fri, 17 Nov 2017 02:09:11 -0800 (PST) Received: from localhost ([::1]:44846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFda5-0007ni-Vf for importer@patchew.org; Fri, 17 Nov 2017 05:09:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFdY4-0006eQ-BH for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:07:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFdY1-00063U-6d for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:07:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58950) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eFdY0-00060v-WA for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:06:57 -0500 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 24E35C0587DB; Fri, 17 Nov 2017 10:06:56 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-103.ams2.redhat.com [10.36.116.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id DCD2811A2AC; Fri, 17 Nov 2017 10:06:53 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3784A3F13A; Fri, 17 Nov 2017 11:06:53 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 17 Nov 2017 11:06:52 +0100 Message-Id: <20171117100653.13015-5-kraxel@redhat.com> In-Reply-To: <20171117100653.13015-1-kraxel@redhat.com> References: <20171117100653.13015-1-kraxel@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.32]); Fri, 17 Nov 2017 10:06:56 +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] [PULL 4/5] sdl2: Do not leave grab when fullscreen 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: Jindrich Makovicka , 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" From: Jindrich Makovicka Prevents displaying of a doubled mouse pointer when moving the pointer to the screen edges when fullscreen. Signed-off-by: Jindrich Makovicka Message-Id: <20171112193032.9724-8-makovick@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index cf05214f97..8360054094 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -471,8 +471,9 @@ static void handle_mousemotion(SDL_Event *ev) SDL_GetWindowSize(scon->real_window, &scr_w, &scr_h); max_x =3D scr_w - 1; max_y =3D scr_h - 1; - if (gui_grab && (ev->motion.x =3D=3D 0 || ev->motion.y =3D=3D 0 || - ev->motion.x =3D=3D max_x || ev->motion.y =3D=3D = max_y)) { + if (gui_grab && !gui_fullscreen + && (ev->motion.x =3D=3D 0 || ev->motion.y =3D=3D 0 || + ev->motion.x =3D=3D max_x || ev->motion.y =3D=3D max_y)) { sdl_grab_end(scon); } if (!gui_grab && --=20 2.9.3 From nobody Sun May 5 16:57:04 2024 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 1510913518192945.3429893871612; Fri, 17 Nov 2017 02:11:58 -0800 (PST) Received: from localhost ([::1]:44866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFdcj-0001mr-4W for importer@patchew.org; Fri, 17 Nov 2017 05:11:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFdY4-0006eO-B7 for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:07:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFdY2-00064g-7l for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:07:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44200) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eFdY2-000641-1U for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:06:58 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 07599CAA77; Fri, 17 Nov 2017 10:06:57 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-103.ams2.redhat.com [10.36.116.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA8FF7D03E; Fri, 17 Nov 2017 10:06:56 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 46F063F417; Fri, 17 Nov 2017 11:06:53 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 17 Nov 2017 11:06:53 +0100 Message-Id: <20171117100653.13015-6-kraxel@redhat.com> In-Reply-To: <20171117100653.13015-1-kraxel@redhat.com> References: <20171117100653.13015-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 17 Nov 2017 10:06:57 +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] [PULL 5/5] sdl2: Fix broken display updating after the window is hidden 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: Jindrich Makovicka , 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" From: Jindrich Makovicka With SDL 2.0.6, calling SDL_ShowWindow during SDL_WINDOWEVENT_HIDDEN blocks all subsequent display updates. Instead of trying to override the change, just update the scon->hidden flag. Signed-off-by: Jindrich Makovicka Message-Id: <20171112193032.9724-2-makovick@gmail.com> This is a partial revert of d3f3a0f453ea590be529079ae214c200bb5ecc1a, which in turn is a workaround for a SDL bug. The bug is fixed in 2.0.6, see https://bugzilla.libsdl.org/show_bug.cgi?id=3D3410 Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index 8360054094..8718cf36b5 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -581,14 +581,10 @@ static void handle_windowevent(SDL_Event *ev) } break; case SDL_WINDOWEVENT_SHOWN: - if (scon->hidden) { - SDL_HideWindow(scon->real_window); - } + scon->hidden =3D false; break; case SDL_WINDOWEVENT_HIDDEN: - if (!scon->hidden) { - SDL_ShowWindow(scon->real_window); - } + scon->hidden =3D true; break; } } --=20 2.9.3