macOS Fl_Scroll subtle bug

8 views
Skip to first unread message

Gonzalo Garramuno

unread,
Nov 23, 2022, 11:57:25 AM11/23/22
to fltkc...@googlegroups.com
On macOS, Fl_Scroll redraws incorrectly when its area exceeds the window it is in, it seems. I found the issue in the sample program that comes with this email or archive, as well as in my application which has nested groups.

The problem is that Fl_Cocoa_Window_Driver::scroll() never returns 1 from this function. It does not do the checks of success in the drawn areas as they are done in X11 and Win32 counterparts.

As a stop gap, for the time being, I am patching FLTK's Fl_Cocoa_Window_Driver::scroll() to always return 1 which fixes the issue (but it is likely not very efficient).

To test the error, compile FLTK with and without the patch.

And compile the sample program main.cpp with fltk-config.

$ fltk-config --compile main.cpp
macos_fl_scroll_issues.zip

melcher....@googlemail.com

unread,
Nov 24, 2022, 4:57:39 AM11/24/22
to fltk.coredev
I fixed this in a pull request. If Manolo OK's it, it will merge in a day or so.

Reply all
Reply to author
Forward
0 new messages