From 8545febdaac50ee3c741f20141c20c27911a5b96 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 14 Jan 2011 09:56:07 -0600 Subject: Unboxing variants if they're in events. --- libdbusmenu-glib/server.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libdbusmenu-glib') diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index 373cc05..100eb14 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -1047,6 +1047,12 @@ bus_event (DbusmenuServer * server, GVariant * params, GDBusMethodInvocation * i event_data->timestamp = g_variant_get_uint32(g_variant_get_child_value(params, 3)); event_data->variant = g_variant_get_child_value(params, 2); + if (g_variant_is_of_type(event_data->variant, G_VARIANT_TYPE_VARIANT)) { + event_data->variant = g_variant_get_variant(event_data->variant); + } + + g_variant_ref(event_data->variant); + g_timeout_add(0, event_local_handler, event_data); g_dbus_method_invocation_return_value(invocation, NULL); -- cgit v1.2.3