diff options
author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-06-20 23:28:14 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-06-20 23:30:46 -0600 |
commit | 845d3c47bd5dc8c7c7966e835579f10e69c5d92e (patch) | |
tree | 3633c3dacd4ddecfb8de85e08805880121023039 | |
parent | 9cdce1b8ff6e50affd0c20696b2dd8048e45b3bb (diff) |
Reapply gamma LUT when re-enabling an output using wlr-output-power-management
-rw-r--r-- | dwl.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2024,14 +2024,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 |