summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdksurface.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 63abe2595b..6d8b84ee34 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -265,6 +265,9 @@ gdk_surface_get_layout_monitor (GdkSurface *surface,
&root_rect.x,
&root_rect.y);
+ root_rect.width = MAX (1, root_rect.width);
+ root_rect.height = MAX (1, root_rect.height);
+
display = get_display_for_surface (surface, surface->transient_for);
return get_monitor_for_rect (display, &root_rect, get_bounds);
}