[gtk/wip/carlosg/text-handle-natives: 35/36] gtkpopover: Ensure the pointed to rectangle has a minimum w/h
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/text-handle-natives: 35/36] gtkpopover: Ensure the pointed to rectangle has a minimum w/h
- Date: Thu, 27 Feb 2020 18:27:56 +0000 (UTC)
commit 62267f89f5e7d5144aaae1c828ba6a770191dc28
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Feb 27 18:07:38 2020 +0100
gtkpopover: Ensure the pointed to rectangle has a minimum w/h
On wayland, protocol errors will be raised if the rectangle width/height
are 0. Avoid that situation so it's valid to all popovers.
gtk/gtkpopover.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 404bdc9b1d..85c280c484 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -1608,6 +1608,8 @@ gtk_popover_set_pointing_to (GtkPopover *popover,
{
priv->pointing_to = *rect;
priv->has_pointing_to = TRUE;
+ priv->pointing_to.width = MAX (priv->pointing_to.width, 1);
+ priv->pointing_to.height = MAX (priv->pointing_to.height, 1);
}
else
priv->has_pointing_to = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]