mirror of
https://github.com/swaywm/sway.git
synced 2026-04-20 06:47:03 -04:00
desktop/output: merge power management config on top of current one
Don't replace an existing config with a blank one with just the power field set. Logic borrowed from apply_output_config_to_outputs().
This commit is contained in:
parent
bc30ec6dd3
commit
be22072492
1 changed files with 8 additions and 2 deletions
|
|
@ -644,6 +644,12 @@ void handle_output_power_manager_set_mode(struct wl_listener *listener,
|
||||||
oc->power = 1;
|
oc->power = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
oc = store_output_config(oc);
|
|
||||||
apply_output_config(oc, output);
|
struct output_config *current = find_output_config(output);
|
||||||
|
if (!current) {
|
||||||
|
current = new_output_config(oc->name);
|
||||||
|
merge_output_config(current, oc);
|
||||||
|
}
|
||||||
|
apply_output_config(current, output);
|
||||||
|
free_output_config(current);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue