Fl_Flex subtle bug

7 views
Skip to first unread message

Gonzalo Garramuno

unread,
Oct 19, 2022, 8:54:16 AM10/19/22
to fltkc...@googlegroups.com
Currently, Fl_Flex’s set_size(Widget*, int size ) cals w->resize(0,0,size,size). This is problematic when the widget is hidden as it can create refresh problems once is shown(), as the coordinates will stay at 0,0 briefly.
The solution is to call the Widget’s w->size( size, size ); instead, so that the Widget’s coordinates are not reset.

Find attached a patch for it.
Fl_Flex.patch.txt

Gonzalo Garramuno

unread,
Oct 19, 2022, 9:28:31 AM10/19/22
to fltkc...@googlegroups.com


> El 19 oct. 2022, a las 09:54, Gonzalo Garramuno <ggar...@gmail.com> escribió:
>
> Currently, Fl_Flex’s set_size(Widget*, int size ) cals w->resize(0,0,size,size). This is problematic when the widget is hidden as it can create refresh problems once is shown(), as the coordinates will stay at 0,0 briefly.
> The solution is to call the Widget’s w->size( size, size ); instead, so that the Widget’s coordinates are not reset.
>

I also created a PR request:

Fixed 0,0 resize of widget which could lead to drawing issues... #518


Gonzalo Garramuno
ggar...@gmail.com




Reply all
Reply to author
Forward
0 new messages