[Git][wxwidgets/wxwidgets][master] Fix for titlebar showing on Wayland with wxBORDER_NONE and server-side decorations

2 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Apr 7, 2026, 2:10:51 PM (4 days ago) Apr 7
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 236e5c24
    by Paul Cornett at 2026-04-07T11:07:18-07:00
    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
    

1 changed file:

Changes:

  • src/gtk/toplevel.cpp
    ... ... @@ -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 Notification message regarding https://gitlab.com/wxwidgets/wxwidgets/-/commit/236e5c2451fa8ddca85f9bdf8778c5c38d0083a2 at 1775585449

Reply all
Reply to author
Forward
0 new messages