[gtk/fishbowl-crash] gdk: Fix gdk_surface_get_layout_monitor
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fishbowl-crash] gdk: Fix gdk_surface_get_layout_monitor
- Date: Mon, 3 Aug 2020 01:29:40 +0000 (UTC)
commit 5a55f6ff7b981760272861b1d67b5a7dfb2bd7ad
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Aug 2 21:27:03 2020 -0400
gdk: Fix gdk_surface_get_layout_monitor
We are determining the monitor by maximizing the
intersection; that only works if our rectangle
is not empty.
Fixes: #3003
gdk/gdksurface.c | 3 +++
1 file changed, 3 insertions(+)
---
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]