From: Alexander Butenko Date: Sun, 8 Jan 2012 13:26:50 +0000 (-0400) Subject: Remove focus grabbing when showing suggestions X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74ae33e2324543d9f9dcb0e37329b949b6a7cfc0;p=midori Remove focus grabbing when showing suggestions --- diff --git a/extensions/formhistory/formhistory-gdom-frontend.c b/extensions/formhistory/formhistory-gdom-frontend.c index 5e4676df..2a91b1d5 100644 --- a/extensions/formhistory/formhistory-gdom-frontend.c +++ b/extensions/formhistory/formhistory-gdom-frontend.c @@ -148,7 +148,6 @@ formhistory_reposition_popup (FormHistoryPriv* priv) /* Window configuration */ gtk_window_set_screen (GTK_WINDOW (priv->popup), gtk_widget_get_screen (view)); - /* FIXME: If Midori window is small, popup doesn't show up */ gtk_window_set_transient_for (GTK_WINDOW (priv->popup), GTK_WINDOW (toplevel)); gtk_tree_view_columns_autosize (GTK_TREE_VIEW (priv->treeview)); /* FIXME: Adjust size according to treeview width and some reasonable height */ @@ -212,13 +211,12 @@ formhistory_suggestions_show (FormHistoryPriv* priv) } sqlite3_reset (stmt); sqlite3_clear_bindings (stmt); - gtk_widget_grab_focus (priv->treeview); - if (gtk_widget_get_visible (priv->popup)) - return; - formhistory_reposition_popup (priv); - gtk_widget_show_all (priv->popup); - gtk_widget_grab_focus (priv->treeview); + if (!gtk_widget_get_visible (priv->popup)) + { + formhistory_reposition_popup (priv); + gtk_widget_show_all (priv->popup); + } } static void