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
This commit is contained in:
Vadim Zeitlin
2012-06-21 13:19:30 +00:00
parent 692a0709d3
commit 5da0507745

View File

@@ -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)