mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-02 11:55:59 +01:00
backend/x11: fix extra output
This commit is contained in:
parent
f37e8c5b6e
commit
5111f7df84
2 changed files with 5 additions and 6 deletions
|
@ -61,7 +61,7 @@ struct wlr_renderer *wlr_backend_get_renderer(struct wlr_backend *backend) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int parse_outputs_env(const char *name) {
|
static size_t parse_outputs_env(const char *name) {
|
||||||
const char *outputs_str = getenv(name);
|
const char *outputs_str = getenv(name);
|
||||||
if (outputs_str == NULL) {
|
if (outputs_str == NULL) {
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -83,8 +83,8 @@ static struct wlr_backend *attempt_wl_backend(struct wl_display *display) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int outputs = parse_outputs_env("WLR_WL_OUTPUTS");
|
size_t outputs = parse_outputs_env("WLR_WL_OUTPUTS");
|
||||||
for (int i = 0; i < outputs; ++i) {
|
for (size_t i = 0; i < outputs; ++i) {
|
||||||
wlr_wl_output_create(backend);
|
wlr_wl_output_create(backend);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,8 +98,8 @@ static struct wlr_backend *attempt_x11_backend(struct wl_display *display,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int outputs = parse_outputs_env("WLR_X11_OUTPUTS");
|
size_t outputs = parse_outputs_env("WLR_X11_OUTPUTS");
|
||||||
for (int i = 0; i < outputs; ++i) {
|
for (size_t i = 0; i < outputs; ++i) {
|
||||||
wlr_x11_output_create(backend);
|
wlr_x11_output_create(backend);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -282,7 +282,6 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display,
|
||||||
|
|
||||||
wlr_backend_init(&x11->backend, &backend_impl);
|
wlr_backend_init(&x11->backend, &backend_impl);
|
||||||
x11->wl_display = display;
|
x11->wl_display = display;
|
||||||
x11->requested_outputs = 1;
|
|
||||||
wl_list_init(&x11->outputs);
|
wl_list_init(&x11->outputs);
|
||||||
|
|
||||||
x11->xlib_conn = XOpenDisplay(x11_display);
|
x11->xlib_conn = XOpenDisplay(x11_display);
|
||||||
|
|
Loading…
Reference in a new issue