CtrlCore: we need to call logic related to GTK splashscreen on Wayland a little bit earlier to avoid windows with no titlebar.

This commit is contained in:
Zbigniew Rębacz 2026-01-25 12:00:33 +01:00
parent 85c3e1af6a
commit 3956d45a60

View file

@ -70,8 +70,11 @@ void Ctrl::Create(Ctrl *owner, bool popup)
w.gdk = nullptr;
TopWindow *tw = dynamic_cast<TopWindow *>(this);
if(popup)
if(popup) {
gtk_window_set_decorated(gtk(), FALSE);
if(IsWayland() && !owner) // otherwise Wayland adds titlebar to splashscreens....
gtk_window_set_titlebar(gtk(), gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0));
}
gtk_window_set_type_hint(gtk(),
popup ? /*owner ? GDK_WINDOW_TYPE_HINT_COMBO : */GDK_WINDOW_TYPE_HINT_POPUP_MENU
: tw && tw->tool ? GDK_WINDOW_TYPE_HINT_UTILITY
@ -118,8 +121,6 @@ void Ctrl::Create(Ctrl *owner, bool popup)
ONCELOCK {
UpdateWindowFrameMargins();
}
if(IsWayland() && !owner) // otherwise Wayland adds titlebar to splashscreens....
gtk_window_set_titlebar(gtk(), gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0));
top->client = top->window;
}