fontforge/fontforge — pull request #1862 by tshinnic (2014-10-25 04:56:19+00:00)
Title: Open file dialog file list: tighten cursor hit checking

One difficulty with testing the recent issue with listing discovered
font names in popups taking a very long time with PDF files, was that
any near approach to the file list by the mouse cursor would trigger
the font name lookup code. It was impossible to use the vertical scroll
bar, as that was included in the 'hit' checked area of the dialog.

The list area hit testing in `WithinList()` was asking for the 'size' of
the file list, then checking if the mouse coordinates were within that
area. But the actual routine being used to determine list bounds,
`gdraw/glist.c` routine `glist_getsize()`, was explicitly adding the area
of the vertical scroll bar to the 'list' area.

A different method for hit testing is using `gdraw/ggadgets.c` routine
`GGadgetWithin()` which will use only the *real* bounds of the list's
content area.

Without this change, font name list popups can be provoked when moving
the cursor within the vertical scroll bar. With the change, that popup code
is not invoked by mouse movements within the scroll bar, and which then
avoids any possible slow downs due to the other issue.

I don't know how many other dialog lists might have this issue. It is
very confusing as all these gdraw routines were implemented at nearly
the same time. Why the better, more precise, hit check wasn't done here
when easily available... confuses.