summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Mikhaylenko <alexm@gnome.org>2023-02-09 21:24:09 +0400
committerMarge Bot <marge-bot@gnome.org>2023-02-09 22:01:51 +0000
commit8db657269712bc8cb4eb0c83ac5364b77d223d12 (patch)
tree6795ee96445f1973340be8c5519ddfe0bf2432f0
parent0c804cea9aa44c17432480f51716f5d5c0cce405 (diff)
downloadepiphany-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.c5
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));