diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2024-03-08 12:35:10 +0100 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2024-03-08 12:35:10 +0100 |
| commit | 194c83aa48e391b49213ae9be0784d0b21fc1235 (patch) | |
| tree | b12a573fbbec834da552fe483e0ab1622104087b | |
| parent | 499d303d782094133f90b52fb5beafcf2b001d46 (diff) | |
config/output: drop enabling flag
This was useful when wlroots backends were updating the current
mode on their own. This is no longer the case.
| -rw-r--r-- | include/sway/output.h | 2 | ||||
| -rw-r--r-- | sway/config/output.c | 6 |
2 files changed, 1 insertions, 7 deletions
diff --git a/include/sway/output.h b/include/sway/output.h index 30595f54..d546d488 100644 --- a/include/sway/output.h +++ b/include/sway/output.h @@ -50,7 +50,7 @@ struct sway_output { enum wl_output_subpixel detected_subpixel; enum scale_filter_mode scale_filter; - bool enabling, enabled; + bool enabled; list_t *workspaces; struct sway_output_state current; diff --git a/sway/config/output.c b/sway/config/output.c index 55779771..1b2332e9 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -510,9 +510,6 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { struct wlr_output *wlr_output = output->wlr_output; - // Flag to prevent the output mode event handler from calling us - output->enabling = (!oc || oc->enabled); - struct wlr_output_state pending = {0}; queue_output_config(oc, output, &pending); @@ -522,12 +519,9 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { // Leave the output disabled for now and try again when the output gets // the mode we asked for. sway_log(SWAY_ERROR, "Failed to commit output %s", wlr_output->name); - output->enabling = false; return false; } - output->enabling = false; - if (oc && !oc->enabled) { sway_log(SWAY_DEBUG, "Disabling output %s", oc->name); if (output->enabled) { |
