From 1b718353374c980618a7c855586fbfa6f58a7c17 Mon Sep 17 00:00:00 2001 From: Misterff1 Date: Sun, 2 Aug 2026 12:58:49 +0200 Subject: [PATCH] Fixed some desktop environments showing title bar on splash screen when running on Wayland (#15019) * Remove titlebar from splash screen on Wayland * Broadly check for window decorations and added explanatory description * Fixed hiding title bar on Wayland for all desktop environments * Update format --------- Co-authored-by: noisyfox --- src/slic3r/GUI/GUI_App.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 07e99348bb..4c4bdfd62c 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -307,6 +307,20 @@ public: #endif // !__APPLE__ ) { + // Some desktop environments ignore splash screen typed window properties + // when running the app through Wayland,resulting in the titlebar being shown + // on the splash screen. The code below creates a client-side window decoration + // when running on Wayland and then removes that decoration. This ensures every + // environment correctly targets and removes the titlebar for this screen. + #if defined(__WXGTK__) + if (Slic3r::GUI::is_running_on_wayland()) { + GtkWidget *empty = gtk_fixed_new(); + gtk_widget_set_size_request(empty, 0, 0); + gtk_window_set_titlebar(GTK_WINDOW(GetHandle()), empty); + gtk_window_set_decorated(GTK_WINDOW(GetHandle()), false); + } + #endif + this->SetPosition(pos); this->CenterOnScreen();