Small fixes

This commit is contained in:
kyak 2023-12-09 11:32:58 +03:00
parent a23ad60ae3
commit 224d83d23d

View file

@ -785,7 +785,7 @@ output_add_virtual(struct server *server, const char *output_name)
struct output *output; struct output *output;
wl_list_for_each(output, &server->outputs, link) { wl_list_for_each(output, &server->outputs, link) {
if (wlr_output_is_headless(output->wlr_output) && if (wlr_output_is_headless(output->wlr_output) &&
!strcmp(output->wlr_output->name, output_name)) { !strcmp(output->wlr_output->name, output_name)) {
wlr_log(WLR_DEBUG, wlr_log(WLR_DEBUG,
"refusing to create virtual output with duplicate name"); "refusing to create virtual output with duplicate name");
return; return;
@ -796,6 +796,10 @@ output_add_virtual(struct server *server, const char *output_name)
} else { } else {
server->headless.pending_output_name[0] = '\0'; server->headless.pending_output_name[0] = '\0';
} }
/*
* Setting it to (0, 0) here disallows changing resolution from tools like
* wlr-randr (returns error)
*/
wlr_headless_add_output(server->headless.backend, 1920, 1080); wlr_headless_add_output(server->headless.backend, 1920, 1080);
} }