fix scollbar off by one error

Andreas Mohr andi at rhlx01.fht-esslingen.de
Mon Sep 26 06:54:25 CDT 2005


Hi,

On Mon, Sep 26, 2005 at 05:08:09PM +0530, Vijay Kiran Kamuju wrote:
> Changelog
> ---------------
> fix scrollbar off by one error (bug 765)

   r = *rect;
   if( vertical )
-    r.bottom = r.top + arrowSize;
+    r.bottom = (r.top++) + arrowSize;
   else
-    r.right = r.left + arrowSize;
+    r.right = (r.left++) + arrowSize;

Are you sure this is what you want?

This will increment r.top and r.left, too!

Even if it is exactly what you intend it to do, then this code is still
confusing and should instead use more explicit notation.

Andreas Mohr



More information about the wine-devel mailing list