aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Vanlaer <vincent.vanlaer@skynet.be>2018-02-09 17:14:36 +0100
committerVincent Vanlaer <vincent.vanlaer@skynet.be>2018-02-09 17:29:14 +0100
commit2df97ed16aa66f2e5f54b847b4389d4b1af5cc40 (patch)
treef2217458f6065a49e0f79078fcc5fbc04d245138
parentf5e5d1983b96f848ed89bdd3b0ea9825efa75063 (diff)
Set needs_swap on output when gamma changes
-rw-r--r--backend/drm/drm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 70e6a1cf..15be16bc 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -232,10 +232,15 @@ static void wlr_drm_connector_set_gamma(struct wlr_output *output,
uint32_t size, uint16_t *r, uint16_t *g, uint16_t *b) {
struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output;
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)output->backend;
+ bool ok;
if (conn->crtc) {
- drm->iface->crtc_set_gamma(drm, conn->crtc, r, g, b, size);
+ ok = drm->iface->crtc_set_gamma(drm, conn->crtc, r, g, b, size);
+ if (ok) {
+ wlr_output_update_needs_swap(output);
+ }
}
+
}
static uint32_t wlr_drm_connector_get_gamma_size(struct wlr_output *output) {