[gtk/wip/matthiasc/context-menu: 23/29] popover menu: Set autohide



commit 3d05cc8d990fe457557c5943634a1e6bb224ace9
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jun 10 23:33:36 2019 +0000

    popover menu: Set autohide
    
    This is the expected behavior for menus.

 gtk/gtkpopovermenu.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkpopovermenu.c b/gtk/gtkpopovermenu.c
index 7e922c6dc1..cfe237caca 100644
--- a/gtk/gtkpopovermenu.c
+++ b/gtk/gtkpopovermenu.c
@@ -348,8 +348,10 @@ gtk_popover_menu_new (GtkWidget *relative_to)
 
   g_return_val_if_fail (relative_to == NULL || GTK_IS_WIDGET (relative_to), NULL);
 
-  popover = g_object_new (GTK_TYPE_POPOVER_MENU, NULL);
-  gtk_popover_set_relative_to (GTK_POPOVER (popover), relative_to);
+  popover = g_object_new (GTK_TYPE_POPOVER_MENU,
+                          "relative-to", relative_to,
+                          "autohide", TRUE,
+                          NULL);
 
   return popover;
 }


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