Window decoration fixes for Wayland.

Allow setting no decorations, and an attempt to allow setting no title bar.
closes #15553


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2013-10-09 18:07:31 +00:00
parent 128c13c149
commit 40cbd1603a
2 changed files with 10 additions and 0 deletions

View File

@@ -392,6 +392,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
gtk_container_add(GTK_CONTAINER(m_widget), eventbox); gtk_container_add(GTK_CONTAINER(m_widget), eventbox);
m_gdkDecor = 0; m_gdkDecor = 0;
gtk_window_set_decorated(GTK_WINDOW(m_widget), false);
m_gdkFunc = 0; m_gdkFunc = 0;
if (style & wxRESIZE_BORDER) if (style & wxRESIZE_BORDER)
m_gdkFunc = GDK_FUNC_RESIZE; m_gdkFunc = GDK_FUNC_RESIZE;

View File

@@ -720,6 +720,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
if ( (style & wxSIMPLE_BORDER) || (style & wxNO_BORDER) ) if ( (style & wxSIMPLE_BORDER) || (style & wxNO_BORDER) )
{ {
m_gdkDecor = 0; m_gdkDecor = 0;
gtk_window_set_decorated(GTK_WINDOW(m_widget), false);
} }
else // have border else // have border
{ {
@@ -727,6 +728,14 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
if ( style & wxCAPTION ) if ( style & wxCAPTION )
m_gdkDecor |= GDK_DECOR_TITLE; m_gdkDecor |= GDK_DECOR_TITLE;
#if defined(GDK_WINDOWING_WAYLAND) && GTK_CHECK_VERSION(3,10,0)
else if (
GDK_IS_WAYLAND_SCREEN(gtk_window_get_screen(GTK_WINDOW(m_widget))) &&
gtk_check_version(3,10,0) == NULL)
{
gtk_window_set_titlebar(GTK_WINDOW(m_widget), gtk_header_bar_new());
}
#endif
if ( style & wxSYSTEM_MENU ) if ( style & wxSYSTEM_MENU )
m_gdkDecor |= GDK_DECOR_MENU; m_gdkDecor |= GDK_DECOR_MENU;