diff options
author | Simon Ser <contact@emersion.fr> | 2021-10-29 12:54:08 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-10-29 15:03:17 +0200 |
commit | 83090de0340e020c75cca9f28e74cf5413dabd04 (patch) | |
tree | 02f2f19e84b8db78dbf7fbd3061ad2d81457f099 /backend/drm | |
parent | b2f6ff45c2e60b99cb4e204ad9c0909a3892bb36 (diff) |
backend/drm: avoid creating empty FB_DAMAGE_CLIPS prop
drmModeCreatePropertyBlob cannot create zero-sized blobs, that
fails with EINVAL.
Closes: https://github.com/swaywm/wlroots/issues/3297
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/atomic.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c index 70f55aff..53487914 100644 --- a/backend/drm/atomic.c +++ b/backend/drm/atomic.c @@ -201,6 +201,7 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn, uint32_t fb_damage_clips = 0; if ((state->base->committed & WLR_OUTPUT_STATE_DAMAGE) && + pixman_region32_not_empty((pixman_region32_t *)&state->base->damage) && crtc->primary->props.fb_damage_clips != 0) { int rects_len; const pixman_box32_t *rects = pixman_region32_rectangles( |