diff options
author | Timm Bäder <mail@baedert.org> | 2015-09-22 18:25:26 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2015-09-29 15:28:55 +0200 |
commit | eb8a64982e4a6294bfa513b385d0cbb42b796686 (patch) | |
tree | fd1d5e5f48623b27ae56abfb2370b6d326af4fe6 /gtk/gtkpopover.c | |
parent | 5ea692df23cf6caed7624554be46b8f39fe008ce (diff) | |
download | gtk+-eb8a64982e4a6294bfa513b385d0cbb42b796686.tar.gz |
GtkPopover: Remove _get_pointed_to_coords
It's only used once and removing it only adds a single line there.
https://bugzilla.gnome.org/show_bug.cgi?id=755435
Diffstat (limited to 'gtk/gtkpopover.c')
-rw-r--r-- | gtk/gtkpopover.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c index 969717ba16..9b4d8ecf41 100644 --- a/gtk/gtkpopover.c +++ b/gtk/gtkpopover.c @@ -616,22 +616,6 @@ gtk_popover_unmap (GtkWidget *widget) g_clear_object (&priv->prev_default); } -static void -gtk_popover_get_pointed_to_coords (GtkPopover *popover, - GdkRectangle *rect_out) -{ - GtkPopoverPrivate *priv = popover->priv; - GdkRectangle rect; - - if (!rect_out) - return; - - gtk_popover_get_pointing_to (popover, &rect); - gtk_widget_translate_coordinates (priv->widget, GTK_WIDGET (priv->window), - rect.x, rect.y, &rect.x, &rect.y); - *rect_out = rect; -} - static GtkPositionType get_effective_position (GtkPopover *popover, GtkPositionType pos) @@ -972,7 +956,10 @@ gtk_popover_update_position (GtkPopover *popover) gtk_widget_get_allocation (GTK_WIDGET (priv->window), &window_alloc); priv->final_position = priv->preferred_position; - gtk_popover_get_pointed_to_coords (popover, &rect); + gtk_popover_get_pointing_to (popover, &rect); + gtk_widget_translate_coordinates (priv->widget, GTK_WIDGET (priv->window), + rect.x, rect.y, &rect.x, &rect.y); + pos = get_effective_position (popover, priv->preferred_position); overshoot[GTK_POS_TOP] = req.height - rect.y; |