diff options
author | Alexander Mikhaylenko <alexm@gnome.org> | 2023-02-09 21:24:09 +0400 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2023-02-09 22:01:51 +0000 |
commit | 8db657269712bc8cb4eb0c83ac5364b77d223d12 (patch) | |
tree | 6795ee96445f1973340be8c5519ddfe0bf2432f0 | |
parent | 0c804cea9aa44c17432480f51716f5d5c0cce405 (diff) | |
download | epiphany-8db657269712bc8cb4eb0c83ac5364b77d223d12.tar.gz |
location-entry: Handle popover hiding correctly
Ensure show_suggestions is correctly reset. I don't think it's causing any
bugs atm, but it looks like a timebomb.
Deselect the last item, we don't want that remembered next time.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1282>
-rw-r--r-- | src/ephy-location-entry.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ephy-location-entry.c b/src/ephy-location-entry.c index 0e363c9b4..f97b9471f 100644 --- a/src/ephy-location-entry.c +++ b/src/ephy-location-entry.c @@ -773,8 +773,11 @@ suggestions_popover_notify_visible_cb (EphyLocationEntry *entry) { GtkAdjustment *adj; - if (!gtk_widget_get_visible (entry->suggestions_popover)) + if (!gtk_widget_get_visible (entry->suggestions_popover)) { + gtk_single_selection_set_selected (entry->suggestions_model, GTK_INVALID_LIST_POSITION); + entry->show_suggestions = FALSE; return; + } adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (entry->scrolled_window)); |