Fix xf_rail_paint fencepost error
authorbjcollins <bcollins@trustedcs.com>
Thu, 15 Oct 2015 19:29:48 +0000 (14:29 -0500)
committerbjcollins <bcollins@trustedcs.com>
Thu, 15 Oct 2015 19:29:48 +0000 (14:29 -0500)
The regions used to store and calculate the invalidRegion are exclusive
of the bottom and right edges, not inclusive.

Fixes "mouse droppings" in mspaint.exe when moving the mouse leftwards
across the canvas.

client/X11/xf_client.c

index a788ab2..2df32f4 100644 (file)
@@ -342,7 +342,7 @@ BOOL xf_sw_end_paint(rdpContext* context)
 
                xf_lock_x11(xfc, FALSE);
 
-               xf_rail_paint(xfc, x, y, x + w - 1, y + h - 1);
+               xf_rail_paint(xfc, x, y, x + w, y + h);
 
                xf_unlock_x11(xfc, FALSE);
        }
@@ -455,7 +455,7 @@ BOOL xf_hw_end_paint(rdpContext* context)
 
                xf_lock_x11(xfc, FALSE);
 
-               xf_rail_paint(xfc, x, y, x + w - 1, y + h - 1);
+               xf_rail_paint(xfc, x, y, x + w, y + h);
 
                xf_unlock_x11(xfc, FALSE);
        }