summaryrefslogtreecommitdiff
path: root/gtk/gtktextview.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2013-11-11 14:27:19 +0100
committerCarlos Garnacho <carlosg@gnome.org>2014-01-22 17:10:04 +0100
commit923da6a8b82677ee840a477124590dc8ca130237 (patch)
tree9f30edbb79b209717a406c6de901b153eadf6141 /gtk/gtktextview.c
parente506f67c9b672d2a887fde835dafc7b62cf85cb1 (diff)
downloadgtk+-923da6a8b82677ee840a477124590dc8ca130237.tar.gz
bubblewindow: Make it relative to GtkWidget coordinates
GdkWindows are gone now from the API, the pointed_to rectangle is from now on relative to the widget allocation. GtkTextView and GtkEntry were updated to adapt to this change.
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r--gtk/gtktextview.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index b32a24ae44..de6f41ee6c 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -8888,7 +8888,6 @@ bubble_targets_received (GtkClipboard *clipboard,
gboolean can_insert;
GtkTextIter iter;
GtkTextIter sel_start, sel_end;
- GdkWindow *window;
GtkWidget *toolbar;
has_selection = gtk_text_buffer_get_selection_bounds (get_buffer (text_view),
@@ -8902,8 +8901,7 @@ bubble_targets_received (GtkClipboard *clipboard,
if (priv->selection_bubble)
gtk_widget_destroy (priv->selection_bubble);
- window = gtk_widget_get_window (GTK_WIDGET (text_view));
- priv->selection_bubble = _gtk_bubble_window_new ();
+ priv->selection_bubble = _gtk_bubble_window_new (GTK_WIDGET (text_view));
toolbar = GTK_WIDGET (gtk_toolbar_new ());
gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_TEXT);
gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), FALSE);
@@ -8931,7 +8929,7 @@ bubble_targets_received (GtkClipboard *clipboard,
rect.x -= priv->xoffset;
rect.y -= priv->yoffset;
_gtk_bubble_window_popup (GTK_BUBBLE_WINDOW (priv->selection_bubble),
- window, &rect, GTK_POS_TOP);
+ GTK_WIDGET (text_view), &rect, GTK_POS_TOP);
priv->selection_bubble_timeout_id = 0;
}