From dca2fe5daecf9c74f227062d8a9a259b4e5ef1fc Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sun, 18 Aug 2013 15:01:06 +0000 Subject: [PATCH] Move code that does not need realized GdkWinow out of realize handler These calls can be made much earlier, and it seems like a good idea to do so. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/toplevel.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 9199f36516..01a4079d54 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -353,14 +353,6 @@ void wxTopLevelWindowGTK::GTKHandleRealized() gdk_window_set_functions(gtk_widget_get_window(m_widget), (GdkWMFunction)m_gdkFunc); - // GTK's shrinking/growing policy - if ( !(m_gdkFunc & GDK_FUNC_RESIZE) ) - gtk_window_set_resizable(GTK_WINDOW(m_widget), FALSE); -#ifndef __WXGTK3__ - else - gtk_window_set_policy(GTK_WINDOW(m_widget), 1, 1, 1); -#endif - const wxIconBundle& icons = GetIcons(); if (icons.GetIconCount()) SetIcons(icons); @@ -754,6 +746,13 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, } } + if ((style & wxRESIZE_BORDER) == 0) + gtk_window_set_resizable(GTK_WINDOW(m_widget), false); +#ifndef __WXGTK3__ + else + gtk_window_set_policy(GTK_WINDOW(m_widget), 1, 1, 1); +#endif + // GTK sometimes chooses very small size if max size hint is not explicitly set DoSetSizeHints(m_minWidth, m_minHeight, m_maxWidth, m_maxHeight, m_incWidth, m_incHeight); -- 2.45.2