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 <timemanager.rick@gmail.com>
This commit is contained in:
Misterff1
2026-08-02 12:58:49 +02:00
committed by GitHub
parent f9fa1c117f
commit 1b71835337

View File

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