aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2024-06-20 23:32:44 -0600
committerLeonardo Hernández Hernández <leohdz172@proton.me>2024-06-20 23:32:44 -0600
commitbaedf7f7918976757fbdd1b11649f0820482d1c6 (patch)
tree1ccdba9e916b9f9b91e9fbd10f1d646a43326b18 /dwl.c
parent4cf1d604b8912fdd5854f4a1d981cdfc5955b890 (diff)
parent845d3c47bd5dc8c7c7966e835579f10e69c5d92e (diff)
Merge remote-tracking branch 'upstream/main' into wlroots-next
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/dwl.c b/dwl.c
index 32eaba6..1a29c97 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2074,14 +2074,16 @@ powermgrsetmode(struct wl_listener *listener, void *data)
{
struct wlr_output_power_v1_set_mode_event *event = data;
struct wlr_output_state state = {0};
+ Monitor *m = event->output->data;
- if (!event->output->data)
+ if (!m)
return;
+ m->gamma_lut_changed = 1; /* Reapply gamma LUT when re-enabling the ouput */
wlr_output_state_set_enabled(&state, event->mode);
- wlr_output_commit_state(event->output, &state);
+ wlr_output_commit_state(m->wlr_output, &state);
- ((Monitor *)(event->output->data))->asleep = !event->mode;
+ m->asleep = !event->mode;
}
void