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();