diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index e8485f2034..7eb4280f8b 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -1726,6 +1726,16 @@ gdk_surface_constrain_size (GdkGeometry *geometry, { gint delta; + if (flags & GDK_HINT_BASE_SIZE) + { + width -= base_width; + height -= base_height; + min_width -= base_width; + min_height -= base_height; + max_width -= base_width; + max_height -= base_height; + } + if (geometry->min_aspect * height > width) { delta = FLOOR (height - width / geometry->min_aspect, yinc); @@ -1751,6 +1761,12 @@ gdk_surface_constrain_size (GdkGeometry *geometry, height += delta; } } + + if (flags & GDK_HINT_BASE_SIZE) + { + width += base_width; + height += base_height; + } } #undef FLOOR