Merge pull request #2869 from peterh/negorigin

X11 /app: Fix drawing with negative window origin
This commit is contained in:
Bernhard Miklautz 2015-09-04 17:20:17 +02:00
commit 17834af7bb

View File

@ -222,10 +222,10 @@ void xf_rail_invalidate_region(xfContext* xfc, REGION16* invalidRegion)
if (appWindow)
{
windowRect.left = appWindow->x;
windowRect.top = appWindow->y;
windowRect.right = appWindow->x + appWindow->width;
windowRect.bottom = appWindow->y + appWindow->height;
windowRect.left = MAX(appWindow->x, 0);
windowRect.top = MAX(appWindow->y, 0);
windowRect.right = MAX(appWindow->x + appWindow->width, 0);
windowRect.bottom = MAX(appWindow->y + appWindow->height, 0);
region16_clear(&windowInvalidRegion);
region16_intersect_rect(&windowInvalidRegion, invalidRegion, &windowRect);