diff options
author | Ted Gould <ted@gould.cx> | 2011-01-14 09:56:07 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-01-14 09:56:07 -0600 |
commit | 8545febdaac50ee3c741f20141c20c27911a5b96 (patch) | |
tree | ba4c57c004c30e114c6222b13d1932595e371042 | |
parent | 2cfbfcab8a2c73227619eb3cd7a79e1fe17a8b43 (diff) | |
download | libdbusmenu-8545febdaac50ee3c741f20141c20c27911a5b96.tar.gz libdbusmenu-8545febdaac50ee3c741f20141c20c27911a5b96.tar.bz2 libdbusmenu-8545febdaac50ee3c741f20141c20c27911a5b96.zip |
Unboxing variants if they're in events.
-rw-r--r-- | libdbusmenu-glib/server.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); |