Fl_Scroll stretching on macOS

10 views
Skip to first unread message

Gonzalo Garramuno

unread,
Oct 27, 2022, 6:03:56 PM10/27/22
to fltkg...@googlegroups.com
I am facing a strange bug on macOS (which might also be just bad coding on my side albeit I am unsure what).  The bug does not show up on Linux.
I have a non modal, without border window and a Fl_Scrol (vertical)l and inside a Fl_Pack (vertical too) (actually a derived widget that allows layout without redrawing that Greg Ercolano wrote for me once).
The widgets appear correctly on a first run.  The problem is that scrolling the Fl_Scroll, once it shows, with the scrollbar or with the mouse wheel will stretch and blur the contents of the Fl_Pack (as I, hopefully, show in the attached picture).
If I just do a PUSH (instead of a DRAG) on the scrollbar, the Fl_Pack will refresh properly.  Also, if I redraw the window with some auxiliary code that allows changing the position of the window will also fix the redrawing of the Fl_Pack.
Has anyone seen something similar on macOS and may have a clue on what I may be doing wrong?  I tried reproducing it with a simple example, but so far I’ve been unsuccessful
. 


Gonzalo Garramuno
ggar...@gmail.com




Gonzalo Garramuno

unread,
Oct 27, 2022, 7:38:12 PM10/27/22
to fltkg...@googlegroups.com


> El 27 oct. 2022, a las 19:03, Gonzalo Garramuno <ggar...@gmail.com> escribió:
>
> I am facing a strange bug on macOS (which might also be just bad coding on my side albeit I am unsure what). The bug does not show up on Linux.

Okay. I found what it was. The coordinates of the Fl_Scroll ( the h() ) were going outside the Window’s h() size. Here’s a sample program that will exhibit the issue (it is not a bug per se, but it does not happen on Linux, where the code seems like it checks for these conditions).

main.cpp

Matthias Melcher

unread,
Nov 6, 2022, 10:13:27 AM11/6/22
to fltk.general
Just testing if we can change a header in the Google Groups interface
Reply all
Reply to author
Forward
0 new messages