From 0f46d089e81d010d25c50eb473e868c8127d44b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 8 Mar 2021 19:32:36 +0100 Subject: [PATCH] X11: Fix attribs not applied on leaving fullscreen If the GLFW_DECORATED and/or GLFW_FLOATING window attributes were changed while in fullscreen mode, the changes did not take effect when the window entered windowed mode. Bug reported on the GLFW forum. https://discourse.glfw.org/t/turning-on-off-window-decorations-while-in-full-screen-wont-work-properly/1780 (cherry picked from commit 4afa227a056681d2628894b0893527bf69496a41) --- README.md | 2 +- src/x11_window.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5538a8a7..1291216c 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ information on what to include when reporting a bug. ## Changelog -There is nothing here yet. + - [X11] Bugfix: Some window attributes were not applied on leaving fullscreen ## Contact diff --git a/src/x11_window.c b/src/x11_window.c index 90c4d9be..d52ebc4d 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -2500,7 +2500,11 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window, } if (window->monitor) + { + _glfwPlatformSetWindowDecorated(window, window->decorated); + _glfwPlatformSetWindowFloating(window, window->floating); releaseMonitor(window); + } _glfwInputWindowMonitor(window, monitor); updateNormalHints(window, width, height);