Fix for titlebar showing on Wayland with wxBORDER_NONE and server-side decorations Removing decorations with gtk_window_set_decorated() is insufficient to disable titlebar with some Wayland compositors. See #26357
| ... | ... | @@ -899,14 +899,6 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, |
| 899 | 899 | |
| 900 | 900 | if ( style & wxCAPTION )
|
| 901 | 901 | m_gdkDecor |= GDK_DECOR_TITLE;
|
| 902 | -#if GTK_CHECK_VERSION(3,10,0)
|
|
| 903 | - else if (
|
|
| 904 | - wxGTKImpl::IsWayland(display) &&
|
|
| 905 | - gtk_check_version(3,10,0) == nullptr)
|
|
| 906 | - {
|
|
| 907 | - gtk_window_set_titlebar(GTK_WINDOW(m_widget), gtk_header_bar_new());
|
|
| 908 | - }
|
|
| 909 | -#endif
|
|
| 910 | 902 | |
| 911 | 903 | if ( style & wxSYSTEM_MENU )
|
| 912 | 904 | m_gdkDecor |= GDK_DECOR_MENU;
|
| ... | ... | @@ -923,6 +915,14 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, |
| 923 | 915 | m_gdkDecor |= GDK_DECOR_RESIZEH;
|
| 924 | 916 | }
|
| 925 | 917 | }
|
| 918 | +#if GTK_CHECK_VERSION(3,10,0)
|
|
| 919 | + if ((m_gdkDecor & GDK_DECOR_TITLE) == 0 &&
|
|
| 920 | + wxGTKImpl::IsWayland(display) &&
|
|
| 921 | + wx_is_at_least_gtk3(10))
|
|
| 922 | + {
|
|
| 923 | + gtk_window_set_titlebar(GTK_WINDOW(m_widget), gtk_header_bar_new());
|
|
| 924 | + }
|
|
| 925 | +#endif
|
|
| 926 | 926 | |
| 927 | 927 | m_decorSize = GetCachedDecorSize();
|
| 928 | 928 |
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help