mirror of
https://github.com/swaywm/sway.git
synced 2025-02-17 14:54:27 +00:00
config/output: avoid no-op enabled output change
Ensure that allow_reconfiguration is always set even if we skip the enabled change.
This commit is contained in:
parent
020a572ed6
commit
d4de4cbe57
|
@ -392,14 +392,18 @@ static void queue_output_config(struct output_config *oc,
|
||||||
|
|
||||||
struct wlr_output *wlr_output = output->wlr_output;
|
struct wlr_output *wlr_output = output->wlr_output;
|
||||||
|
|
||||||
if (oc && (!oc->enabled || oc->power == 0)) {
|
pending->allow_reconfiguration = true;
|
||||||
sway_log(SWAY_DEBUG, "Turning off output %s", wlr_output->name);
|
|
||||||
wlr_output_state_set_enabled(pending, false);
|
bool enabled = !oc || (oc->enabled != 0 && oc->power != 0);
|
||||||
return;
|
if (wlr_output->enabled != enabled) {
|
||||||
|
sway_log(SWAY_DEBUG, "Turning %s output %s",
|
||||||
|
enabled ? "on" : "off", wlr_output->name);
|
||||||
|
wlr_output_state_set_enabled(pending, enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
sway_log(SWAY_DEBUG, "Turning on output %s", wlr_output->name);
|
if (!enabled) {
|
||||||
wlr_output_state_set_enabled(pending, true);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (oc && oc->drm_mode.type != 0 && oc->drm_mode.type != (uint32_t) -1) {
|
if (oc && oc->drm_mode.type != 0 && oc->drm_mode.type != (uint32_t) -1) {
|
||||||
sway_log(SWAY_DEBUG, "Set %s modeline",
|
sway_log(SWAY_DEBUG, "Set %s modeline",
|
||||||
|
|
Loading…
Reference in a new issue