diff options
author | Simon Ser <contact@emersion.fr> | 2023-10-05 10:41:15 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-11-21 15:05:58 +0100 |
commit | 5bdd6085148d8eddf0ae8f9a25ec32eb5bfd48ad (patch) | |
tree | 790c700df9691ba9ab7336d3ea26a4501205d9f4 /sway/desktop/output.c | |
parent | view: re-apply criteria when window gets unmapped (diff) | |
download | sway-5bdd6085148d8eddf0ae8f9a25ec32eb5bfd48ad.tar.gz sway-5bdd6085148d8eddf0ae8f9a25ec32eb5bfd48ad.tar.zst sway-5bdd6085148d8eddf0ae8f9a25ec32eb5bfd48ad.zip |
Apply gamma LUT when an output re-enabled
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3679
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index f2bc4a67..53730073 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -964,6 +964,11 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
964 | wlr_damage_ring_set_bounds(&output->damage_ring, width, height); | 964 | wlr_damage_ring_set_bounds(&output->damage_ring, width, height); |
965 | wlr_output_schedule_frame(output->wlr_output); | 965 | wlr_output_schedule_frame(output->wlr_output); |
966 | } | 966 | } |
967 | |||
968 | // Next time the output is enabled, try to re-apply the gamma LUT | ||
969 | if ((event->committed & WLR_OUTPUT_STATE_ENABLED) && !output->wlr_output->enabled) { | ||
970 | output->gamma_lut_changed = true; | ||
971 | } | ||
967 | } | 972 | } |
968 | 973 | ||
969 | static void handle_present(struct wl_listener *listener, void *data) { | 974 | static void handle_present(struct wl_listener *listener, void *data) { |