Show the completion list after the hight was set.
authorDaniel Carl <danielcarl@gmx.de>
Wed, 9 Apr 2014 22:47:19 +0000 (00:47 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Wed, 9 Apr 2014 22:47:19 +0000 (00:47 +0200)
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

index 6740284..d01207b 100644 (file)
@@ -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;
 }