src/Fl_Native_File_Chooser_WIN32.cxx:331:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
331 | while ( s=strchr(s,'\\') ) *s = '/';
| ~^~~~~~~~~~~~~~~
src/Fl_Native_File_Chooser_WIN32.cxx:336:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
336 | while ( s=strchr(s,'/') ) *s = '\\';
| ~^~~~~~~~~~~~~~
I compiled with `-Wextra-semi -Werror=extra-semi` on Linux and Windows
(cross-compiled on Linux) and removed all "extra semicolon" warnings
I could find. I didn't check on macOS (yet).
Note: Linux configured with and w/o Pango but not w/o Xft. Compilation
with other options (e.g. Cairo) might still emit such warnings.
CMake/compatibility.cmake: define functions and macros to be used
if a particular CMake functionality requires a higher CMake version
than FLTK's minimum CMake version, see 'cmake_minimum_required(...)'
in the root CMakeLists.txt.
Note: target_link_directories() is available since CMake 3.13
Add CMake test for PTHREAD_MUTEX_RECURSIVE
Add autoconf/configure compile test for PTHREAD_MUTEX_RECURSIVE
Replace "#ifdef PTHREAD_MUTEX_RECURSIVE"
with "#ifdef HAVE_PTHREAD_MUTEX_RECURSIVE"
and define HAVE_PTHREAD_MUTEX_RECURSIVE in config.h
- add missing dependencies to build the shared libfltk_cairo(.dylib)
- remove incorrect dependency on cairo from libfltk
- add cairo_test-shared demo (linked with shared libs)
The old version would reschedule an existing timer if a matching timer
existed already which was unique to macOS.
The new behavior is consistent on all platforms and allows to create
multiple timer entries with the same callback and userdata.
Calling Fl::repeat_timeout() instead of Fl::add_timeout() to create
a timer would crash on macOS but fall back to Fl::add_timeout() on
Windows and Unix/Linux. Although this is documented as "undefined
behavior" a crash should always be avoided and the fallback is now
consistent on all major platforms.
In the future this may be documented as the standard behavior.
Issue #210: "Fl::event_x() & event_y() doesn't take into account
embedded window's coords with Mouse wheel events"
In fact the calculation of Fl::event_x() and Fl::event_y() used the
wrong window coordinates if the event was sent to a subwindow.
This is a hypothetical fix, since the condition `count == 0` may not
be true although `doit` has been allocated. In practice this should
not be possible since the same loop is executed twice in lines 463++
and 471++. But anyway, here it is...
Some of the previous constness changes turned out to be incomplete,
others had to be reverted because some other driver methods could
not be made 'const' - particularly those calling open_display() to
get the requested information.
As requested by issue #181:
"Fl_Screen_Driver.H non-const functions should be const"
Not all methods could be made 'const' because some screen related
methods call init() internally.
Fl::event_key() display needs to be converted to UTF-8 for keycodes
outside the ASCII range (0xa0 - 0xff). Such keycodes can be found
on international keyboards.
src/Fl_Native_File_Chooser_WIN32.cxx:190:10:
warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound
depends on the length of the source argument [-Wstringop-overflow=]
190 | strncpy(wp2, string, n);
| ~~~~~~~^~~~~~~~~~~~~~~~
Although there was no real problem with the code (the allocated buffer
was large enough), the code was questionable and there was redundant
code that could be simplified.