summaryrefslogtreecommitdiff
path: root/src/rmd_poll_events.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-01-06 19:09:34 -0800
committerVito Caputo <vcaputo@pengaru.com>2021-01-06 19:09:34 -0800
commitedda2929c0ca023699629e5d22d8cc553e2e2821 (patch)
tree7ea5b33666f9dd1773613d57fb7807c65332609b /src/rmd_poll_events.c
parentb3ebcb7895ec67469a67dff253dca90aba65111e (diff)
poll_events: fix clip bounds check in uv_align
This would potentially exceed the clip w/h on odd inputs because it was wrongly adding the cliprect offset while comparing against coordinates already made relative within the cliprect
Diffstat (limited to 'src/rmd_poll_events.c')
-rw-r--r--src/rmd_poll_events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rmd_poll_events.c b/src/rmd_poll_events.c
index af1fecf..6af8cc7 100644
--- a/src/rmd_poll_events.c
+++ b/src/rmd_poll_events.c
@@ -125,10 +125,10 @@ static void uv_align(XRectangle *cliprect, XRectangle *xrect)
* the UV routines will handle the exception - which might temporarily
* mean they just lop the odd row/column off the edge.
*/
- if (rel.width % 2 && rel.width + rel.x < cliprect->x + cliprect->width)
+ if (rel.width % 2 && rel.width + rel.x < cliprect->width)
rel.width++;
- if (rel.height % 2 && rel.height + rel.y < cliprect->y + cliprect->height)
+ if (rel.height % 2 && rel.height + rel.y < cliprect->height)
rel.height++;
xrect->x = rel.x + cliprect->x;
© All Rights Reserved