summaryrefslogtreecommitdiff
path: root/gtk/gtkpopovermenu.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2019-10-03 22:13:54 +0200
committerBenjamin Otte <otte@redhat.com>2019-10-07 04:49:50 +0200
commit578dc9e70bb5f4d25900ea1eb6e03c3b7e31afd6 (patch)
treef69dd4814fbe954b2cb7a6dfe0d2b6d4e8fca450 /gtk/gtkpopovermenu.c
parent6769db160db9b8bcfc1af3f51f54b6a49c701dfa (diff)
downloadgtk+-578dc9e70bb5f4d25900ea1eb6e03c3b7e31afd6.tar.gz
eventcontrollerkey: Add getters for the properties
...and use them.
Diffstat (limited to 'gtk/gtkpopovermenu.c')
-rw-r--r--gtk/gtkpopovermenu.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/gtk/gtkpopovermenu.c b/gtk/gtkpopovermenu.c
index 98b52058bc..02ee7706cb 100644
--- a/gtk/gtkpopovermenu.c
+++ b/gtk/gtkpopovermenu.c
@@ -210,19 +210,15 @@ visible_submenu_changed (GObject *object,
}
static void
-focus_out (GtkEventController *controller,
- GdkCrossingMode mode,
- GdkNotifyType detail,
- GtkPopoverMenu *menu)
+focus_out (GtkEventControllerKey *controller,
+ GdkCrossingMode mode,
+ GdkNotifyType detail,
+ GtkPopoverMenu *menu)
{
- gboolean contains_focus;
-
- g_object_get (controller, "contains-focus", &contains_focus, NULL);
-
- if (!contains_focus)
+ if (!gtk_event_controller_key_contains_focus (controller))
{
if (menu->parent_menu &&
- GTK_POPOVER_MENU (menu->parent_menu)->open_submenu == (GtkWidget*)menu)
+ GTK_POPOVER_MENU (menu->parent_menu)->open_submenu == (GtkWidget*) menu)
GTK_POPOVER_MENU (menu->parent_menu)->open_submenu = NULL;
gtk_popover_popdown (GTK_POPOVER (menu));
}