From: Vadim Zeitlin Date: Thu, 21 Jun 2012 13:19:30 +0000 (+0000) Subject: Don't call gtk_window_set_geometry_hints() if there are no hints to set. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5da0507745a4edeee7cfa899721bd34699cf19d3 Don't call gtk_window_set_geometry_hints() if there are no hints to set. Calling gtk_window_set_geometry_hints() with the hints mask of 0 doesn't work correctly and sets the window size to the smallest possible. Avoid this by simply not calling this function at all if there is nothing to do. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 0dd59d4b33..4462297a79 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -1137,8 +1137,12 @@ void wxTopLevelWindowGTK::DoSetSizeHints( int minW, int minH, hints.width_inc = incW > 0 ? incW : 1; hints.height_inc = incH > 0 ? incH : 1; } - gtk_window_set_geometry_hints( - (GtkWindow*)m_widget, NULL, &hints, (GdkWindowHints)hints_mask); + + if (hints_mask) + { + gtk_window_set_geometry_hints( + (GtkWindow*)m_widget, NULL, &hints, (GdkWindowHints)hints_mask); + } } void wxTopLevelWindowGTK::GTKUpdateDecorSize(const wxSize& decorSize)