diff options
-rw-r--r-- | libdbusmenu-gtk/client.c | 13 | ||||
-rw-r--r-- | tests/Makefile.am | 3 |
2 files changed, 10 insertions, 6 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 38b6a75..533764a 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -505,7 +505,6 @@ menu_item_stop_activating(DbusmenuMenuitem * mi) guint id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(parent), data_idle_close_id)); if (id > 0) { - g_source_remove(id); g_object_set_data(G_OBJECT(parent), data_idle_close_id, GINT_TO_POINTER(0)); should_close = TRUE; @@ -575,6 +574,14 @@ close_in_idle (DbusmenuMenuitem * mi) } static void +cancel_idle_close_id (gpointer data) +{ + guint id = GPOINTER_TO_INT(data); + if (id > 0) + g_source_remove(id); +} + +static void submenu_notify_visible_cb (GtkWidget * menu, GParamSpec * pspec, DbusmenuMenuitem * mi) { if (gtk_widget_get_visible (menu)) { @@ -591,8 +598,8 @@ submenu_notify_visible_cb (GtkWidget * menu, GParamSpec * pspec, DbusmenuMenuite data_idle_close_id)); if (id == 0) { id = g_idle_add((GSourceFunc)close_in_idle, mi); - g_object_set_data(G_OBJECT(mi), data_idle_close_id, - GINT_TO_POINTER(id)); + g_object_set_data_full(G_OBJECT(mi), data_idle_close_id, + GINT_TO_POINTER(id), cancel_idle_close_id); } } } diff --git a/tests/Makefile.am b/tests/Makefile.am index a4e8682..935e0f9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -29,9 +29,6 @@ TESTS += \ test-gtk-parser-test endif -XFAIL_TESTS = \ - test-glib-proxy - # The Python test only work on the system copy of # dbusmenu, so while they can be usefule they're not # good tests of what you're currently building. Handy |