aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib/client.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-03-21 14:27:09 -0500
committerTed Gould <ted@gould.cx>2012-03-21 14:27:09 -0500
commit6460e42cc9d14f03204e836b0f984102eac8159c (patch)
tree17fc215e733326c96649dc5eb8dc3ecdf5d45bed /libdbusmenu-glib/client.c
parent588831fa1ac3390f08d0f40d6f7e0da6a969b99d (diff)
parentebab055ed741101f59c320367eb8be7484555a48 (diff)
downloadlibdbusmenu-6460e42cc9d14f03204e836b0f984102eac8159c.tar.gz
libdbusmenu-6460e42cc9d14f03204e836b0f984102eac8159c.tar.bz2
libdbusmenu-6460e42cc9d14f03204e836b0f984102eac8159c.zip
* New upstream release.
* Fix theme change bug (LP: #953509) * Don't request event responses if no one is listening * Fix a warning on custom menu items without labels
Diffstat (limited to 'libdbusmenu-glib/client.c')
-rw-r--r--libdbusmenu-glib/client.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 01f063d..7d96db3 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -1540,6 +1540,18 @@ dbusmenu_client_send_event (DbusmenuClient * client, gint id, const gchar * name
variant = g_variant_new_int32(0);
}
+ /* Don't bother with the reply handling if nobody is watching... */
+ if (!g_signal_has_handler_pending (client, signals[EVENT_RESULT], 0, TRUE)) {
+ g_dbus_proxy_call(priv->menuproxy,
+ "Event",
+ g_variant_new("(isvu)", id, name, variant, timestamp),
+ G_DBUS_CALL_FLAGS_NONE,
+ 1000, /* timeout */
+ NULL, /* cancellable */
+ NULL, NULL);
+ return;
+ }
+
event_data_t * edata = g_new0(event_data_t, 1);
edata->client = client;
g_object_ref(client);