As already mentionned, the solution for this problem is to use the
Fl_Window::shape() member function. See :
This feature is available in FLTK 1.4 and also starting from FLTK 1.3.3 provided the library is built with
FL_ABI_VERSION = 10303 (or more)
Giving a window the shape of an Fl_ROUND_BOX is done in FLTK 1.4 to transiently
display the new value of the scale factor (type ctrl-+ (or cmd-+ on macOS)).
The code is found in function Fl_Screen_Driver::transient_scale_display() of
file Fl_Screen_Driver.cxx :
- lines 363-373 create an Fl_RGB_Image object containing the adequate shape information
- line 388 applies this shape to the window (and also set it without titlebar)
That should be enough.