Set needs_swap on output when gamma changes

This commit is contained in:
Vincent Vanlaer 2018-02-09 17:14:36 +01:00
parent f5e5d1983b
commit 2df97ed16a
1 changed files with 6 additions and 1 deletions

View File

@ -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) {