diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-07-01 06:26:45 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-07-01 06:26:45 +0800 |
commit | 486e1939b5347d6ead5d1d0dcbc65399a1072ecc (patch) | |
tree | 4e616f4bad2b03e61b6a2a991414633d1325e46d /lib/widgets | |
parent | ece5e036c19540f6973b510bd7d108bc3c0ad742 (diff) | |
download | gsoc2013-epiphany-486e1939b5347d6ead5d1d0dcbc65399a1072ecc.tar gsoc2013-epiphany-486e1939b5347d6ead5d1d0dcbc65399a1072ecc.tar.gz gsoc2013-epiphany-486e1939b5347d6ead5d1d0dcbc65399a1072ecc.tar.bz2 gsoc2013-epiphany-486e1939b5347d6ead5d1d0dcbc65399a1072ecc.tar.lz gsoc2013-epiphany-486e1939b5347d6ead5d1d0dcbc65399a1072ecc.tar.xz gsoc2013-epiphany-486e1939b5347d6ead5d1d0dcbc65399a1072ecc.tar.zst gsoc2013-epiphany-486e1939b5347d6ead5d1d0dcbc65399a1072ecc.zip |
Hide only when necessary. Remove gdk_ungrab stuff that doesnt seem to be
2003-07-01 Marco Pesenti Gritti <marco@it.gnome.org>
* 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.
Diffstat (limited to 'lib/widgets')
-rw-r--r-- | lib/widgets/ephy-autocompletion-window.c | 12 | ||||
-rw-r--r-- | lib/widgets/ephy-location-entry.c | 7 |
2 files changed, 8 insertions, 11 deletions
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); } diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c index 8e869e1a5..3ecebe5a2 100644 --- a/lib/widgets/ephy-location-entry.c +++ b/lib/widgets/ephy-location-entry.c @@ -343,6 +343,13 @@ static void ephy_location_entry_autocompletion_show_alternatives (EphyLocationEntry *w) { EphyLocationEntryPrivate *p = w->priv; + + /* Reset it because if we do a grab on click (like when pasting + text in the location entry, the entry will lose the release + event and will not reset it. It's what gtk does for the entry + popup */ + GTK_ENTRY (w)->button = 0; + if (p->autocompletion_window) { ephy_autocompletion_window_show (p->autocompletion_window); |