mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-11 19:17:33 +00:00
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:
@@ -307,6 +307,20 @@ public:
|
|||||||
#endif // !__APPLE__
|
#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->SetPosition(pos);
|
||||||
this->CenterOnScreen();
|
this->CenterOnScreen();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user