[gtk/wip/carlosg/text-handle-natives: 6/8] gtkpopover: Re-present surface if position/pointing-to change while visible
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/text-handle-natives: 6/8] gtkpopover: Re-present surface if position/pointing-to change while visible
- Date: Fri, 20 Mar 2020 14:53:47 +0000 (UTC)
commit 9a0b70fc84c8cc0afc68d7a81a848ec203662fdc
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Feb 27 18:08:46 2020 +0100
gtkpopover: Re-present surface if position/pointing-to change while visible
This ensures the popover will follow the new position parameters. This is
necessary for popovers like the text magnifier that can be repositioned
while visible.
gtk/gtkpopover.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index c6e2d70e0d..088759f45c 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -1657,6 +1657,9 @@ gtk_popover_set_pointing_to (GtkPopover *popover,
priv->has_pointing_to = FALSE;
g_object_notify_by_pspec (G_OBJECT (popover), properties[PROP_POINTING_TO]);
+
+ if (gtk_widget_is_visible (GTK_WIDGET (popover)))
+ present_popup (popover);
}
/**
@@ -1726,6 +1729,9 @@ gtk_popover_set_position (GtkPopover *popover,
priv->final_position = position;
g_object_notify_by_pspec (G_OBJECT (popover), properties[PROP_POSITION]);
+
+ if (gtk_widget_is_visible (GTK_WIDGET (popover)))
+ present_popup (popover);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]