diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-12-08 14:45:16 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-12-08 23:27:03 +0100 |
commit | 47d0b5ad0c20e0fbfc7de7d565adfb3f07f620a5 (patch) | |
tree | 4b381b0f0e879e7e8e1dcd673eec6c0318260e80 /gtk/gtktextview.c | |
parent | c59b4333958642c47741415bbc31782ab472d32d (diff) | |
download | gtk+-47d0b5ad0c20e0fbfc7de7d565adfb3f07f620a5.tar.gz |
gkt/textview: Set an iter position for event-less menu activation
This went missing. Use the current insertion position as a reference.
Fixes invoking the menu via keyboard.
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r-- | gtk/gtktextview.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index ce097cb586..5a4ad33e2a 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -8666,11 +8666,15 @@ gtk_text_view_do_popup (GtkTextView *text_view, } else { + GtkTextBuffer *buffer; GtkTextIter iter; GdkRectangle iter_location; GdkRectangle visible_rect; gboolean is_visible; + buffer = get_buffer (text_view); + gtk_text_buffer_get_iter_at_mark (buffer, &iter, + gtk_text_buffer_get_insert (buffer)); gtk_text_view_get_iter_location (text_view, &iter, &iter_location); gtk_text_view_get_visible_rect (text_view, &visible_rect); |