[epiphany/wip/exalm/gtk4: 44/44] bookmark-row: Close popover when opening properties




commit 58adcb61c55c965ae41a0016fb29506f991cffe1
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Apr 11 15:29:19 2022 +0400

    bookmark-row: Close popover when opening properties
    
    Prevent input from being stuck.

 src/bookmarks/ephy-bookmark-row.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/bookmarks/ephy-bookmark-row.c b/src/bookmarks/ephy-bookmark-row.c
index aa9ff723f..34e2a99e3 100644
--- a/src/bookmarks/ephy-bookmark-row.c
+++ b/src/bookmarks/ephy-bookmark-row.c
@@ -51,6 +51,7 @@ static void
 ephy_bookmark_row_button_clicked_cb (EphyBookmarkRow *row,
                                      GtkButton       *button)
 {
+  GtkWidget *popover;
   GtkWidget *dialog;
   GtkWidget *content_area;
   GtkWidget *grid;
@@ -65,6 +66,11 @@ ephy_bookmark_row_button_clicked_cb (EphyBookmarkRow *row,
                          "modal", TRUE,
                          NULL);
 
+  popover = gtk_widget_get_ancestor (GTK_WIDGET (row), GTK_TYPE_POPOVER);
+
+  if (popover)
+    gtk_popover_popdown (GTK_POPOVER (popover));
+
   content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
 
   grid = ephy_bookmark_properties_new (ephy_bookmark_row_get_bookmark (row),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]