From 486e1939b5347d6ead5d1d0dcbc65399a1072ecc Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 30 Jun 2003 22:26:45 +0000 Subject: Hide only when necessary. Remove gdk_ungrab stuff that doesnt seem to be 2003-07-01 Marco Pesenti Gritti * lib/widgets/ephy-autocompletion-window.c: (ephy_autocompletion_window_finalize_impl), (ephy_autocompletion_window_show), (ephy_autocompletion_window_hide): Hide only when necessary. Remove gdk_ungrab stuff that doesnt seem to be necessary. * lib/widgets/ephy-location-entry.c: (ephy_location_entry_autocompletion_show_alternatives): Reset entry->button when showing autocompletion, the grab get gtk crazy otherwise. --- lib/widgets/ephy-autocompletion-window.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'lib/widgets/ephy-autocompletion-window.c') diff --git a/lib/widgets/ephy-autocompletion-window.c b/lib/widgets/ephy-autocompletion-window.c index 0f7a8fc1c..d00cfbb19 100644 --- a/lib/widgets/ephy-autocompletion-window.c +++ b/lib/widgets/ephy-autocompletion-window.c @@ -209,9 +209,6 @@ ephy_autocompletion_window_finalize_impl (GObject *o) g_free (p->selected); g_free (p); - gdk_pointer_ungrab (GDK_CURRENT_TIME); - gdk_keyboard_ungrab (GDK_CURRENT_TIME); - G_OBJECT_CLASS (g_object_class)->finalize (o); } @@ -572,11 +569,6 @@ ephy_autocompletion_window_show (EphyAutocompletionWindow *aw) { gtk_widget_show (p->window); - gdk_pointer_grab (p->parent->window, TRUE, - GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | - GDK_BUTTON_RELEASE_MASK, - NULL, NULL, GDK_CURRENT_TIME); - gdk_keyboard_grab (p->parent->window, TRUE, GDK_CURRENT_TIME);\ gtk_grab_add (p->window); g_signal_connect (p->window, "button-press-event", @@ -820,12 +812,10 @@ ephy_autocompletion_window_key_press_cb (GtkWidget *widget, void ephy_autocompletion_window_hide (EphyAutocompletionWindow *aw) { - if (aw->priv->window) + if (aw->priv->window && aw->priv->shown) { gtk_widget_hide (aw->priv->window); gtk_grab_remove (aw->priv->window); - gdk_pointer_ungrab (GDK_CURRENT_TIME); - gdk_keyboard_ungrab (GDK_CURRENT_TIME); ephy_autocompletion_window_unselect (aw); g_signal_emit (aw, EphyAutocompletionWindowSignals[EPHY_AUTOCOMPLETION_WINDOW_HIDDEN], 0); } -- cgit v1.2.3