aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-11-15 16:50:05 +0100
committerSimon Ser <contact@emersion.fr>2022-11-17 09:12:25 +0000
commitef5e2cc5e3db6243c5201734e8086a56182089b9 (patch)
tree4ddff4dc3070c652074371a9ce2beea1bf304e62
parentfdb24d19ca1cac68b5079f721f2d3a45ea0d2d60 (diff)
output: call wlr_output_update_enabled() after commit
Backends no longer need to manually call wlr_output_update_enabled() in their commit hook: wlr_output will take care of that.
-rw-r--r--backend/drm/drm.c3
-rw-r--r--types/output/output.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index a7ff585e..2a89e6f9 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -595,9 +595,6 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
return false;
}
- if (pending.base->committed & WLR_OUTPUT_STATE_ENABLED) {
- wlr_output_update_enabled(&conn->output, pending.active);
- }
if (pending.base->committed & WLR_OUTPUT_STATE_MODE) {
struct wlr_output_mode *mode = NULL;
switch (pending.base->mode_type) {
diff --git a/types/output/output.c b/types/output/output.c
index 852206b9..6c4b1a31 100644
--- a/types/output/output.c
+++ b/types/output/output.c
@@ -789,6 +789,10 @@ bool wlr_output_commit_state(struct wlr_output *output,
output->commit_seq++;
+ if (pending.committed & WLR_OUTPUT_STATE_ENABLED) {
+ wlr_output_update_enabled(output, pending.enabled);
+ }
+
bool scale_updated = pending.committed & WLR_OUTPUT_STATE_SCALE;
if (scale_updated) {
output->scale = pending.scale;