diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-01-25 14:09:38 +0100 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-01-25 14:09:38 +0100 |
| commit | 496a0fa8a445d03daa85b2870a156b435a00b22c (patch) | |
| tree | a308d93142da75566665f8a4196296d03b17bd3d /services | |
| parent | 71cd3f3b41de87777e03fd6952f22156a25d66d7 (diff) | |
PanelService: add xid parameter to ShowEntry
(bzr r1858.9.5)
Diffstat (limited to 'services')
| -rw-r--r-- | services/panel-main.c | 8 | ||||
| -rw-r--r-- | services/panel-service.c | 11 | ||||
| -rw-r--r-- | services/panel-service.h | 1 |
3 files changed, 16 insertions, 4 deletions
diff --git a/services/panel-main.c b/services/panel-main.c index 317cf6c24..c5aa18063 100644 --- a/services/panel-main.c +++ b/services/panel-main.c @@ -58,8 +58,9 @@ static const gchar introspection_xml[] = " <method name='SyncGeometries'>" " <arg type='a(ssiiii)' name='geometries' direction='in'/>" " </method>" - "" + "" " <method name='ShowEntry'>" + " <arg type='u' name='xid' direction='in'/>" " <arg type='s' name='entry_id' direction='in'/>" " <arg type='u' name='timestamp' direction='in'/>" " <arg type='i' name='x' direction='in'/>" @@ -174,14 +175,15 @@ handle_method_call (GDBusConnection *connection, } else if (g_strcmp0 (method_name, "ShowEntry") == 0) { + guint32 xid; gchar *entry_id; guint32 timestamp; gint32 x; gint32 y; gint32 button; - g_variant_get (parameters, "(suiii)", &entry_id, ×tamp, &x, &y, &button, NULL); + g_variant_get (parameters, "(usuiii)", &xid, &entry_id, ×tamp, &x, &y, &button, NULL); - panel_service_show_entry (service, entry_id, timestamp, x, y, button); + panel_service_show_entry (service, xid, entry_id, timestamp, x, y, button); g_dbus_method_invocation_return_value (invocation, NULL); g_free (entry_id); diff --git a/services/panel-service.c b/services/panel-service.c index 0b37cad63..b9727fad3 100644 --- a/services/panel-service.c +++ b/services/panel-service.c @@ -1453,6 +1453,7 @@ menu_deactivated (GtkWidget *menu) void panel_service_show_entry (PanelService *self, + guint32 xid, const gchar *entry_id, guint32 timestamp, gint32 x, @@ -1518,7 +1519,15 @@ panel_service_show_entry (PanelService *self, priv->last_menu_move_id = g_signal_connect_after (priv->last_menu, "move-current", G_CALLBACK (on_active_menu_move_current), self); - indicator_object_entry_activate (object, entry, CurrentTime); + if (xid > 0) + { + indicator_object_entry_activate_window (object, entry, xid, CurrentTime); + } + else + { + indicator_object_entry_activate (object, entry, CurrentTime); + } + gtk_menu_popup (priv->last_menu, NULL, NULL, positon_menu, self, 0, CurrentTime); GdkWindow *gdkwin = gtk_widget_get_window (GTK_WIDGET (priv->last_menu)); if (gdkwin != NULL) diff --git a/services/panel-service.h b/services/panel-service.h index 861a67cf7..cdacb697b 100644 --- a/services/panel-service.h +++ b/services/panel-service.h @@ -94,6 +94,7 @@ void panel_service_sync_geometry (PanelService *self, gint height); void panel_service_show_entry (PanelService *self, + guint32 xid, const gchar *entry_id, guint32 timestamp, gint32 x, |
