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




commit b92e60cbebf5cdf06e363fbf9e68a1442b3bfbd9
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]