diff options
author | Ted Gould <ted@canonical.com> | 2009-09-17 16:12:42 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-09-17 16:12:42 -0500 |
commit | fa0e53c2e27f0c8ed7cbfa839265e91b4fdf8d67 (patch) | |
tree | df5b9eb931cb501006da3036264286e2f35af264 /libdbusmenu-glib | |
parent | 15c11261bd45e2732a31b2fa235cc2a6261452e4 (diff) | |
download | libdbusmenu-fa0e53c2e27f0c8ed7cbfa839265e91b4fdf8d67.tar.gz libdbusmenu-fa0e53c2e27f0c8ed7cbfa839265e91b4fdf8d67.tar.bz2 libdbusmenu-fa0e53c2e27f0c8ed7cbfa839265e91b4fdf8d67.zip |
Adding in a second checking of the layout if we look for it while we're still requesting it. We're not sure if this creates an issue between the syncing of the two objects.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/client.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 4ae4f75..1bf4e19 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -66,6 +66,7 @@ struct _DbusmenuClientPrivate DBusGProxy * menuproxy; DBusGProxy * propproxy; DBusGProxyCall * layoutcall; + gboolean check_layout; DBusGProxy * dbusproxy; @@ -194,6 +195,7 @@ dbusmenu_client_init (DbusmenuClient *self) priv->menuproxy = NULL; priv->propproxy = NULL; priv->layoutcall = NULL; + priv->check_layout = FALSE; priv->dbusproxy = NULL; @@ -721,6 +723,11 @@ update_layout_cb (DBusGProxy * proxy, DBusGProxyCall * call, void * data) /* g_debug("Root is now: 0x%X", (unsigned int)priv->root); */ g_signal_emit(G_OBJECT(client), signals[LAYOUT_UPDATED], 0, TRUE); + if (priv->check_layout) { + priv->check_layout = FALSE; + update_layout(client); + } + return; } @@ -736,6 +743,7 @@ update_layout (DbusmenuClient * client) } if (priv->layoutcall != NULL) { + priv->check_layout = TRUE; return; } @@ -803,16 +811,9 @@ dbusmenu_client_get_root (DbusmenuClient * client) return NULL; } -#if 0 -/* Seems to be a bug in dbus-glib that assert here, I think because - multiple people try and grab it. We're going to comment this out - for now as everyone should be listening to the root changed signal - anyway. */ if (priv->layoutcall != NULL) { - /* Will end the current call and block on it's completion */ - update_layout_cb(priv->propproxy, priv->layoutcall, client); + priv->check_layout = TRUE; } -#endif return priv->root; } |