Fix for titlebar showing on Wayland with wxBORDER_NONE and server-side decorations
Unix builds / Ubuntu 18.04 wxGTK 3 compatible 3.0 (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK ASAN not compatible (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 20.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 22.04 wxGTK with wx containers (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK UBSAN (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 static with gcc 4.8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
CMake builds / Ubuntu 22.04 wxGTK 3 (push) Has been cancelled
CMake builds / macOS latest wxGTK 3 Unix Makefiles (push) Has been cancelled
CMake builds / MSW/MSVC wxMSW (push) Has been cancelled
CMake builds / MSW/Clang wxMSW (push) Has been cancelled
CMake builds / macOS latest wxOSX Ninja (push) Has been cancelled
CMake builds / macOS 14 wxOSX Xcode (push) Has been cancelled
CMake builds / macOS 14 wxIOS (push) Has been cancelled
CMake builds / MSW/MSVC wxQt 5.15 (push) Has been cancelled
CMake builds / MSW/MSVC wxQt 6.10 (push) Has been cancelled
Code Checks / Check Spelling (push) Has been cancelled
Code Checks / Check Whitespace (push) Has been cancelled
Code Checks / Check Mixed EOL (push) Has been cancelled
Code Checks / Check C++ Style (push) Has been cancelled
Code Checks / Check All Headers In allheaders.h (push) Has been cancelled
No Response / no-response (push) Has been cancelled

Removing decorations with gtk_window_set_decorated() is insufficient to disable
titlebar with some Wayland compositors.
See #26357
This commit is contained in:
Paul Cornett
2026-04-07 11:07:18 -07:00
committed by paulcor
parent 638af54a8a
commit 236e5c2451
+8 -8
View File
@@ -899,14 +899,6 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
if ( style & wxCAPTION )
m_gdkDecor |= GDK_DECOR_TITLE;
#if GTK_CHECK_VERSION(3,10,0)
else if (
wxGTKImpl::IsWayland(display) &&
gtk_check_version(3,10,0) == nullptr)
{
gtk_window_set_titlebar(GTK_WINDOW(m_widget), gtk_header_bar_new());
}
#endif
if ( style & wxSYSTEM_MENU )
m_gdkDecor |= GDK_DECOR_MENU;
@@ -923,6 +915,14 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
m_gdkDecor |= GDK_DECOR_RESIZEH;
}
}
#if GTK_CHECK_VERSION(3,10,0)
if ((m_gdkDecor & GDK_DECOR_TITLE) == 0 &&
wxGTKImpl::IsWayland(display) &&
wx_is_at_least_gtk3(10))
{
gtk_window_set_titlebar(GTK_WINDOW(m_widget), gtk_header_bar_new());
}
#endif
m_decorSize = GetCachedDecorSize();