From 4c9b49bf45b64a266a38ab8d3d915be94faa3ae1 Mon Sep 17 00:00:00 2001 From: Alan Griffiths Date: Mon, 7 Oct 2024 11:46:11 +0000 Subject: [PATCH 1/2] Ensure windows are placed and repainted on X11 "CONFIGURE" (#3619) We are 1. Leaking the X11 `CONFIGURE` placement through (when we should be ignoring it); and, 2. Not properly placing windows that `CONFIGURE` to fullscreen when they are already forced to be fullscreen. This works around these problems in the least invasive way. --- .../mir-x11-kiosk/x11_kiosk_window_manager.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/examples/mir-x11-kiosk/x11_kiosk_window_manager.cpp b/examples/mir-x11-kiosk/x11_kiosk_window_manager.cpp index cfd0d0524e5..459d83651fa 100644 --- a/examples/mir-x11-kiosk/x11_kiosk_window_manager.cpp +++ b/examples/mir-x11-kiosk/x11_kiosk_window_manager.cpp @@ -77,7 +77,8 @@ auto X11KioskWindowManagerPolicy::place_new_window(ApplicationInfo const& app_in (!specification.parent().is_set() || !specification.parent().value().lock())) { specification.state() = mir_window_state_fullscreen; - specification.size() = mir::optional_value{}; // Ignore requested size (if any) when we maximize + specification.size() = mir::optional_value{}; // Ignore requested size (if any) when we fullscreen + specification.top_left() = mir::optional_value{}; // Ignore requested position (if any) when we fullscreen tools.place_and_size_for_state(specification, WindowInfo{}); if (!request.state().is_set() || request.state().value() != mir_window_state_restored) @@ -94,8 +95,20 @@ void X11KioskWindowManagerPolicy::handle_modify_window(WindowInfo& window_info, if ((window_info.type() == mir_window_type_normal || window_info.type() == mir_window_type_freestyle) && !window_info.parent()) { + if (window_info.state() == mir_window_state_fullscreen && modifications.state().is_set()) + { + // If the window is already fullscreen, then first restore it + // as otherwise the client may not repaint + WindowSpecification mods; + mods.state() = mir_window_state_restored; + + tools.place_and_size_for_state(mods, window_info); + tools.modify_window(window_info, mods); + } + specification.state() = mir_window_state_fullscreen; - specification.size() = mir::optional_value{}; // Ignore requested size (if any) when we maximize + specification.size() = mir::optional_value{}; // Ignore requested size (if any) when we fullscreen + specification.top_left() = mir::optional_value{}; // Ignore requested position (if any) when we fullscreen tools.place_and_size_for_state(specification, window_info); if (!modifications.state().is_set() || modifications.state().value() != mir_window_state_restored) From 877a2c94956a65539c1b9befcdbc47ed256411a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Mon, 7 Oct 2024 15:06:00 +0200 Subject: [PATCH 2/2] Release 2.18.3 --- CMakeLists.txt | 2 +- debian/changelog | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df16d9b2ad2..f6ad2ceddf0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(MIR_VERSION_MAJOR 2) set(MIR_VERSION_MINOR 18) -set(MIR_VERSION_PATCH 2) +set(MIR_VERSION_PATCH 3) add_compile_definitions(MIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) add_compile_definitions(MIR_VERSION_MINOR=${MIR_VERSION_MINOR}) diff --git a/debian/changelog b/debian/changelog index 5546c3c3905..dc5542146f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +mir (2.18.3) UNRELEASED; urgency=medium + + * Hotfix release 2.18.3 + + Enhancements: + . Ensure windows are placed and repainted on X11 "CONFIGURE" #3619 + + -- MichaƂ Sawicz Mon, 07 Oct 2024 15:04:33 +0200 + mir (2.18.2) UNRELEASED; urgency=medium * Bugfix release 2.18.2