summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-07-14 14:38:29 -0400
committerlukefromdc <[email protected]>2017-08-13 14:37:24 -0400
commit72d3549c4dbbe6e7373d74550a2f6d2b2f0690a9 (patch)
treec47e05cb87d2a4d1b317d099384485faa8c85aab
parentb5843971f67347393c7087bb5fd7d5f30d98afb6 (diff)
downloadmate-panel-72d3549c4dbbe6e7373d74550a2f6d2b2f0690a9.tar.bz2
mate-panel-72d3549c4dbbe6e7373d74550a2f6d2b2f0690a9.tar.xz
libpanel-applet: return process type and applet uid
Return applet process type and generated uid from factory. Process type will be needed to know if we should create GtkSocket, but uid will be used to get applet widget.
-rw-r--r--libmate-panel-applet/mate-panel-applet-factory.c12
-rw-r--r--mate-panel/libmate-panel-applet-private/panel-applet-container.c11
2 files changed, 19 insertions, 4 deletions
diff --git a/libmate-panel-applet/mate-panel-applet-factory.c b/libmate-panel-applet/mate-panel-applet-factory.c
index f3978aeb..b7e237c1 100644
--- a/libmate-panel-applet/mate-panel-applet-factory.c
+++ b/libmate-panel-applet/mate-panel-applet-factory.c
@@ -176,6 +176,7 @@ mate_panel_applet_factory_get_applet (MatePanelAppletFactory *factory,
const gchar *applet_id;
gint screen_num;
GVariant *props;
+ GVariant *return_value;
GdkScreen *screen;
guint32 xid;
guint32 uid;
@@ -205,8 +206,13 @@ mate_panel_applet_factory_get_applet (MatePanelAppletFactory *factory,
g_hash_table_insert (factory->applets, GUINT_TO_POINTER (uid), applet);
g_object_set_data (applet, "uid", GUINT_TO_POINTER (uid));
- g_dbus_method_invocation_return_value (invocation,
- g_variant_new ("(ou)", object_path, xid));
+ return_value = g_variant_new ("(obuu)",
+ object_path,
+ factory->out_of_process,
+ xid,
+ uid);
+
+ g_dbus_method_invocation_return_value (invocation, return_value);
}
static void
@@ -234,7 +240,9 @@ static const gchar introspection_xml[] =
"<arg name='screen' type='i' direction='in'/>"
"<arg name='props' type='a{sv}' direction='in'/>"
"<arg name='applet' type='o' direction='out'/>"
+ "<arg name='out-of-process' type='b' direction='out'/>"
"<arg name='xid' type='u' direction='out'/>"
+ "<arg name='uid' type='u' direction='out'/>"
"</method>"
"</interface>"
"</node>";
diff --git a/mate-panel/libmate-panel-applet-private/panel-applet-container.c b/mate-panel/libmate-panel-applet-private/panel-applet-container.c
index e4232fcb..4b4ffd2b 100644
--- a/mate-panel/libmate-panel-applet-private/panel-applet-container.c
+++ b/mate-panel/libmate-panel-applet-private/panel-applet-container.c
@@ -32,7 +32,9 @@ struct _MatePanelAppletContainerPrivate {
guint name_watcher_id;
gchar *bus_name;
+ gboolean out_of_process;
guint32 xid;
+ guint32 uid;
GtkWidget *socket;
GHashTable *pending_ops;
@@ -379,7 +381,12 @@ get_applet_cb (GObject *source_object,
}
container = MATE_PANEL_APPLET_CONTAINER (g_async_result_get_source_object (G_ASYNC_RESULT (result)));
- g_variant_get (retvals, "(&ou)", &applet_path, &container->priv->xid);
+ g_variant_get (retvals,
+ "(&obuu)",
+ &applet_path,
+ &container->priv->out_of_process,
+ &container->priv->xid,
+ &container->priv->uid);
g_dbus_proxy_new (connection,
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
@@ -432,7 +439,7 @@ on_factory_appeared (GDBusConnection *connection,
MATE_PANEL_APPLET_FACTORY_INTERFACE,
"GetApplet",
data->parameters,
- G_VARIANT_TYPE ("(ou)"),
+ G_VARIANT_TYPE ("(obuu)"),
G_DBUS_CALL_FLAGS_NONE,
-1,
data->cancellable,