From 8c6ee697fd6d58cd9e1813aa4c1b1061e29a245e Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Thu, 10 Apr 2014 00:47:19 +0200 Subject: [PATCH] Show the completion list after the hight was set. If the completion list is displayed before we set the hight, the user might see the list for a really short time covering the whole webview window before it's resized to fit into the lower third of the view. The patch moved the display of the completion list after the list is calculated and the first entry is marked as active. --- src/completion.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/completion.c b/src/completion.c index 6740284..d01207b 100644 --- a/src/completion.c +++ b/src/completion.c @@ -127,7 +127,6 @@ gboolean completion_create(GtkTreeModel *model, CompletionSelectFunc selfunc, /* this prevents the first item to be placed out of view if the completion * is shown */ - gtk_widget_show_all(comp.win); while (gtk_events_pending()) { gtk_main_iteration(); } @@ -154,6 +153,8 @@ gboolean completion_create(GtkTreeModel *model, CompletionSelectFunc selfunc, comp.active = -1; completion_next(back); + gtk_widget_show_all(comp.win); + return true; } -- 2.20.1