In my GUI application, I have a number of scrollbar-related problems in Windows that I don't see on Linux. My app has a custom canvas% with manual scrollbars.
The main problem occurs when scrolling a very large virtual canvas (> 30,000 pixels high or so). Scrolling via dragging the scroll thumb(?) seems to work as expected until I release the left mouse button. At that point I see an on-scroll event with a bogus position in the event argument. It kinda seems like an integer overflow issue at around 32,768 but it isn't super consistent. Scrolling via set-scroll-pos works fine even with very large values.
I can easily have a virtual canvas with dimensions > 500,000 pixels, so this is a problem.
On a more general note, I've implemented scrolling using units of pixels. Is that how manual scrollbars were intended to be used? I suppose I could use a larger unit, but with the sizes I deal with I expect I will still run into this issue if I keep any degree of fine-grained scrolling.
Right now I'm leaning toward increasing the "scroll unit" when the scroll range approaches 32,000. That way I can retain fine grained scrolling for smaller canvases.
Hopefully that doesn't lead to any of the other problems I've seen on Windows. Namely that I've had trouble when dynamically changing set-scroll-page. It sometimes causes the scrollbar to appear (albeit in an inactive state) even though it should be hidden by show-scrollbars. Similar things would also happen when setting the scroll range to 0 on Windows.
This appears to work well. However, there are still issues(Windows only) with hidden scrollbars appearing, presumably due to calls to set-croll-page or set-scroll-range in my update-scrollbars function.
Don't know about Linux, but Windows scrollbars do have a (small-ish) limit to their range. Best way to deal with it is to pick a useful scale, e.g., 100, 1000, etc., limit the scrollbar to that range, and then map it to your scrollable area.