summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-07-13 12:15:29 +0000
committerMatthias Clasen <mclasen@redhat.com>2020-07-13 12:15:29 +0000
commitb1fe8b5ab4fe9106ab06fa3fc0888b9bf3e10ed5 (patch)
tree36ebfd8cc337d1f2603b3ba62e4348a33e9a6d99
parente363b3a23c5ec89401f3ed8bdfdd2cbdefc5b057 (diff)
parentcadd794d2cf127d3c8ad1668bd3016831dab79d6 (diff)
downloadgtk+-b1fe8b5ab4fe9106ab06fa3fc0888b9bf3e10ed5.tar.gz
Merge branch 'wip/sadiq/fix-entry-magnifier' into 'gtk-3-24'
entry: Restrict magnifier popover within the entry size See merge request GNOME/gtk!2228
-rw-r--r--gtk/gtkentry.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index b3424444a9..e3d512ba6f 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -4667,6 +4667,7 @@ gtk_entry_show_magnifier (GtkEntry *entry,
_gtk_magnifier_set_coords (GTK_MAGNIFIER (priv->magnifier), rect.x,
rect.y + rect.height / 2);
+ rect.x = CLAMP (rect.x, 0, allocation.width);
gtk_popover_set_pointing_to (GTK_POPOVER (priv->magnifier_popover),
&rect);
gtk_popover_popup (GTK_POPOVER (priv->magnifier_popover));