xwm: tell the shell the pid of the X clients

All the surfaces from all the X clients share the same wl_client so
wl_client_get_credentials can't be used to get the pid of the X
clients.
The shell may need to know the pid to be able to associate a surface
with e.g. a DBus service.

[Pekka: fixed trivial merge conflicts.]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Giulio Camuffo
2015-01-27 19:10:37 +02:00
committed by Pekka Paalanen
parent 5d1d2ca325
commit a8e9b41578
3 changed files with 30 additions and 8 deletions
+7
View File
@@ -2251,6 +2251,12 @@ set_title(struct shell_surface *shsurf, const char *title)
shsurf->surface->timeline.force_refresh = 1;
}
static void
set_pid(struct shell_surface *shsurf, pid_t pid)
{
/* We have no use for it */
}
static void
set_type(struct shell_surface *shsurf, enum shell_surface_type t)
{
@@ -6602,6 +6608,7 @@ module_init(struct weston_compositor *ec,
ec->shell_interface.set_title = set_title;
ec->shell_interface.set_window_geometry = set_window_geometry;
ec->shell_interface.set_maximized = shell_interface_set_maximized;
ec->shell_interface.set_pid = set_pid;
weston_layer_init(&shell->fullscreen_layer, &ec->cursor_layer.link);
weston_layer_init(&shell->panel_layer, &shell->fullscreen_layer.link);