The bug is that the app freezes for a few seconds before the yellow transient window is closed
if the close message is set from within a timer callback.
If the window to close returns NO to the canBecomeKeyWindow message, the bug does not occur.
Anyway it's good that canBecomeKeyWindow returns NO for a window with the OUTPUT flag.
This method can be called after all menu modifications to make sure
the menu() array is relocated (copied from the internal working area)
to a private place owned by the Fl_Menu_ instance.
menu_end() is now called in Fl_Menu_Button::popup() to make sure
the menu array is in private storage.
This fixes STR 3523 w/o user code changes. Calling menu_end() is
in most cases optional.
Todo: call menu_end() where useful (or necessary), e.g. in
Fl_Choice, Fl_Menu_Bar, etc. ?
This adds source png and xcf files for checkers pieces.
Also adds Makefile rules using xxd to convert .png -> .h as requested by Albrecht
in issue #29, (hmm, no comment numbers github?)..message dated "June 22nd 2019 4:22am PDT".
OP noticed our one-bit xbm images demonstrated an X11 driver bug
on certain hardware. While it's good that our test programs show the bug
(e.g. test/bitmap), it's bad that our games do.
Removed the 16 xbm files used by checkers which simulated transparency
with dithered images, and replaced with 4 "hexdump" png files that are
cleaner/simpler looking for such lores pieces (46x46 pixels).
Will follow up with a separate commit for the source .png and gimp .xcf
file I used for making the pieces.
As discussed in fltk.general, valgrind reported errors when gl_draw()
is called and the text is converted to a texture (i.e. when testing
whether the texture already exists).
We need a length check to make sure we don't overrun text buffers.
See threads "gl_draw" and "gl_draw - [General Use]", respectively,
started on Jun 19, 2019.
Per-Monitor V2 awareness mode is supported on Windows 10 1703 or above
and has window title bars correctly scaled on HighDPI screens.
Before this commit, FLTK Windows apps were "Per-Monitor-V1 DPI Aware".
FLTK apps detect at run-time whether the V2 mode is possible.
The new argument gives the window to be captured, or NULL to indicate capture
from the current offscreen.
Calling this function becomes easier because less dependent on global variables.
Previously, each time fl_font(fnum, fsize) was called, functions
pango_font_description_free() and pango_font_description_from_string()
would be called.
Now, pango_font_description_from_string() is called only once, the first time
an Fl_Font is used.
Rename member function Fl_Surface_Device::end_current_() to end_current(),
set it protected, and make it called by the destructor of all classes
derived from Fl_Surface_Device that re-implement end_current().
This way, end_current() runs equally if Fl_Surface_Device()::pop_current()
is called before or after the drawing surface is deleted.