mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-02 03:45:58 +01:00
Merge pull request #559 from Ongy/wayland_remote
adds remote argument to wayland backend create
This commit is contained in:
commit
64f6a44329
3 changed files with 8 additions and 4 deletions
|
@ -53,7 +53,7 @@ struct wlr_egl *wlr_backend_get_egl(struct wlr_backend *backend) {
|
|||
}
|
||||
|
||||
static struct wlr_backend *attempt_wl_backend(struct wl_display *display) {
|
||||
struct wlr_backend *backend = wlr_wl_backend_create(display);
|
||||
struct wlr_backend *backend = wlr_wl_backend_create(display, NULL);
|
||||
if (backend) {
|
||||
int outputs = 1;
|
||||
const char *_outputs = getenv("WLR_WL_OUTPUTS");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -11,8 +11,12 @@
|
|||
/**
|
||||
* Creates a new wlr_wl_backend. This backend will be created with no outputs;
|
||||
* you must use wlr_wl_output_create to add them.
|
||||
*
|
||||
* The `remote` argument is the name of the host compositor wayland socket. Set
|
||||
* to NULL for the default behaviour (WAYLAND_DISPLAY env variable or wayland-0
|
||||
* default)
|
||||
*/
|
||||
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);
|
||||
|
||||
/**
|
||||
* Adds a new output to this backend. You may remove outputs by destroying them.
|
||||
|
|
Loading…
Reference in a new issue