Skip to content

Commit

Permalink
[fixup for Add wlr-output-management protocol] == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Consolatis committed Oct 30, 2023
1 parent a02bafe commit f99ad27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/output-management.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ bool wlr_output_manager_resize_output(struct output* output,

config_head = zwlr_output_configuration_v1_enable_head(
config, head->head);
if (head->name && !strcmp(head->name, output->name)) {
if (head->name && strcmp(head->name, output->name) == 0) {
nvnc_trace("reconfiguring output %s", head->name);
zwlr_output_configuration_head_v1_set_custom_mode(
config_head, width, height, refresh_rate);
Expand Down
3 changes: 2 additions & 1 deletion src/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ void output_name(void* data, struct zxdg_output_v1* xdg_output,
struct output* self = data;

strlcpy(self->name, name, sizeof(self->name));
self->is_headless = !strncmp(name, "HEADLESS-", strlen("HEADLESS-"));
self->is_headless = strncmp(
name, "HEADLESS-", strlen("HEADLESS-") == 0);

nvnc_trace("Output %u name: %s, headless: %s", self->id, self->name,
self->is_headless ? "yes" : "no");
Expand Down

0 comments on commit f99ad27

Please sign in to comment.