mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
adds remote argument to wayland backend create
Add a remote display name argument to wlr_wl_backend_create. If NULL is passed to the wayland backend at all times, creating a wayland backend *after* the compositor was started up, would require changing the WAYLAND_DISPLAY environment variable.
This commit is contained in:
parent
03faf17942
commit
c00e9d1416
3 changed files with 4 additions and 4 deletions
|
|
@ -158,7 +158,7 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_wl_backend_destroy(&backend->backend);
|
||||
}
|
||||
|
||||
struct wlr_backend *wlr_wl_backend_create(struct wl_display *display) {
|
||||
struct wlr_backend *wlr_wl_backend_create(struct wl_display *display, const char *remote) {
|
||||
wlr_log(L_INFO, "Creating wayland backend");
|
||||
|
||||
struct wlr_wl_backend *backend = calloc(1, sizeof(struct wlr_wl_backend));
|
||||
|
|
@ -173,7 +173,7 @@ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display) {
|
|||
|
||||
backend->local_display = display;
|
||||
|
||||
backend->remote_display = wl_display_connect(NULL);
|
||||
backend->remote_display = wl_display_connect(remote);
|
||||
if (!backend->remote_display) {
|
||||
wlr_log_errno(L_ERROR, "Could not connect to remote display");
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue