This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH] Incidental setup.exe patches #2: Fix chooser vertical scroll bar.
On 13/04/2010 08:55, Corinna Vinschen wrote:
> On Apr 12 22:59, Dave Korn wrote:
>> + RECT windowRect = GetWindowRect ();
>> + if (hasWindowRect)
>> {
>> int dx;
>> - if ((dx = clientRect.right - clientRect.left -
>> - lastClientRect.width ()) != 0)
>> + if ((dx = windowRect.right - windowRect.left -
>> + lastWindowRect.width ()) != 0)
>> {
[ ... snip ... ]
>> }
>> + if (windowRect.right - windowRect.left - lastWindowRect.width ())
>> + set_vscroll_info (GetClientRect ());
>> }
>> OK?
>
> Yes.
Because I was everso disciplined and applied the patches to a clean tree and
built and tested them before committing, I spotted the above refactoring error
which I cut'n'pasto'd during the last-minute renaming of
hasWindowRect/lastWindowRect. The delta y test should of course be checking
the vertical, not horizontal co-ordinates. *blushes*
Applied after re-testing with the relevant line corrected like so:
+ if (windowRect.bottom - windowRect.top - lastWindowRect.height ())
+ set_vscroll_info (GetClientRect ());
cheers,
DaveK