From 17bc14e08e9a752dd39e0fd1af210358f808b7e6 Mon Sep 17 00:00:00 2001 From: Candifloss Date: Fri, 12 Dec 2025 19:14:09 +0530 Subject: [PATCH] Override window management - No space reserved - No window moving or tiling --- widget/src/show_popup.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/widget/src/show_popup.rs b/widget/src/show_popup.rs index 5ae4435..bb45054 100644 --- a/widget/src/show_popup.rs +++ b/widget/src/show_popup.rs @@ -79,10 +79,13 @@ fn set_ui_props(ui: &MainWindow, resp: &WeatherResponse, cfg: &Config) { /// Create and show the Window UI pub fn show_popup(resp: &WeatherResponse, cfg: &Config) -> Result<(), Box> { - // Closure that adjusts winit WindowAttributes before Slint creates the window. + // Closure to configure X11 window attributes before Slint creates the window. let window_attrs = |attrs: WindowAttributes| { - // Mark the X11 window as a DOCK so the WM doesn't treat it as a normal window - attrs.with_x11_window_type(vec![WindowType::Dock]) + attrs + // Present the window as a dock so most WMs avoid decorations and normal window rules. + .with_x11_window_type(vec![WindowType::Dock]) + // Make the window unmanaged. This prevents tiling WMs from reserving space or moving it. + .with_override_redirect(true) }; // Build a Slint backend that applies this attribute hook to all windows.