mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 15:14:17 +00:00
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.
This commit is contained in:
parent
0f73e83f44
commit
6431bdcf91
@ -1650,6 +1650,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;
|
||||
|
Loading…
Reference in New Issue
Block a user