Output was incorrect, partly to stdout and stderr, resp.
As Manolo noted in fltk.general, Fl_Window::screen_num() is the
correct API to retrieve the screen number of a window rather than
Fl::screen_num(...).
The fix in mouse_event() makes sure the scale factor of the receiving window is correct
when distinct screens have distinct scale factor values.
The fix after WM_MOVE event makes sure a subwindow-containing window in a
multiple-screen desktop having distinct scale factor values is correctly rescaled.
This is intended to be used as
(a) an example of event handling and
(b) a test program to visualize many event related variables
This first version is compatible with FLTK 1.3.x but lacks the screen
scaling factor under 1.3.x (which is always assumed to be 100%).
Note: this does not reflect any system or monitor related settings.
basics.dox: Some minor edits, clarifications and reordering for
better readability.
drawing.dox: minor edits, remove "Figure x.y:" etc. (to be continued)
enumerations.dox: change chapter title
Fix search (string comparison) which had a few different issues.
Document the function, arguments, and details about string matching.
To do: correctly match complex HTML entities like "€" with
Unicode code points >= U+0080 (UTF-8 multi byte encoding).
Under XP (at least), WM_PAINT events occur where information of where to redraw
is mostly given by the system, in the window's update region. When the GUI is scaled,
that information must be un-scaled and then added to Fl_X::i(window)->region, for the
adequate part of the window to be painted.
The corrected error was to use, e.g.,
int dx = W - w->w() * s;
which does not produce the desired integer value.
The correct writing is :
int dx = W - int(w->w() * s);
Based on Greg's mods in 'cube-v5a-patch.txt' in this issue #157 comment:
https://github.com/fltk/fltk/issues/157#issuecomment-732496554
Simplify the layout and keep border widths constant:
- combine left GL window + buttons (ct_group) in left group (lt_grp)
- make the cube Fl_Gl_Windows the resizable()s of their respective groups.
The latter keeps the margin widths constant.
Changes here concentrate the fix within static function alpha_blend() and thus
are visible only when drawing transparent images under X11 platform
without Xrender.