diff --git a/pipewire/pipewire-plugin.c b/pipewire/pipewire-plugin.c index 2c65f502..ca5cbfec 100644 --- a/pipewire/pipewire-plugin.c +++ b/pipewire/pipewire-plugin.c @@ -23,6 +23,8 @@ * SOFTWARE. */ +#include "config.h" + #include #include "backend.h" #include "libweston-internal.h" @@ -630,6 +632,7 @@ pipewire_output_create(struct weston_compositor *c, char *name) const char *model = "Virtual Display"; const char *serial_number = "unknown"; const char *connector_name = "pipewire"; + char *remoting_name; if (!name || !strlen(name)) return NULL; @@ -672,7 +675,8 @@ pipewire_output_create(struct weston_compositor *c, char *name) output->pipewire = pipewire; wl_list_insert(pipewire->output_list.prev, &output->link); - weston_head_init(head, connector_name); + asprintf(&remoting_name, "%s-%s", connector_name, name); + weston_head_init(head, remoting_name); weston_head_set_subpixel(head, WL_OUTPUT_SUBPIXEL_NONE); weston_head_set_monitor_strings(head, make, model, serial_number); head->compositor = c; @@ -680,6 +684,7 @@ pipewire_output_create(struct weston_compositor *c, char *name) weston_output_attach_head(output->output, head); + free(remoting_name); pipewire_output_debug(output, "created"); return output->output; diff --git a/remoting/remoting-plugin.c b/remoting/remoting-plugin.c index a1d994ea..ada101c5 100644 --- a/remoting/remoting-plugin.c +++ b/remoting/remoting-plugin.c @@ -741,6 +741,7 @@ remoting_output_create(struct weston_compositor *c, char *name) const char *model = "Virtual Display"; const char *serial_number = "unknown"; const char *connector_name = "remoting"; + char *remoting_name; if (!name || !strlen(name)) return NULL; @@ -775,7 +776,8 @@ remoting_output_create(struct weston_compositor *c, char *name) output->remoting = remoting; wl_list_insert(remoting->output_list.prev, &output->link); - weston_head_init(head, connector_name); + asprintf(&remoting_name, "%s-%s", connector_name, name); + weston_head_init(head, remoting_name); weston_head_set_subpixel(head, WL_OUTPUT_SUBPIXEL_NONE); weston_head_set_monitor_strings(head, make, model, serial_number); head->compositor = c; @@ -785,6 +787,7 @@ remoting_output_create(struct weston_compositor *c, char *name) /* set XRGB8888 format */ output->format = &supported_formats[0]; + free(remoting_name); return output->output;