mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-26 11:16:30 +00:00
Reapply gamma LUT when re-enabling an output using wlr-output-power-management
This commit is contained in:
parent
9cdce1b8ff
commit
845d3c47bd
1 changed files with 5 additions and 3 deletions
8
dwl.c
8
dwl.c
|
@ -2024,14 +2024,16 @@ powermgrsetmode(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
struct wlr_output_power_v1_set_mode_event *event = data;
|
struct wlr_output_power_v1_set_mode_event *event = data;
|
||||||
struct wlr_output_state state = {0};
|
struct wlr_output_state state = {0};
|
||||||
|
Monitor *m = event->output->data;
|
||||||
|
|
||||||
if (!event->output->data)
|
if (!m)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
m->gamma_lut_changed = 1; /* Reapply gamma LUT when re-enabling the ouput */
|
||||||
wlr_output_state_set_enabled(&state, event->mode);
|
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
|
void
|
||||||
|
|
Loading…
Reference in a new issue