The .keyboard_info merge of `platformSupport` would not always give the
right result, for .js keyboards. We have a certain lack of information
in the .js which makes it a little tricky to determine precisely what
the set of supported platforms are. Thus, if we find a .js within a
.kmp, we'll assume it supports mobile; if we find a .js by itself,
we'll assume it supports web. (Thus, a keyboard that builds a .js
is assumed to always support web -- but not necessarily mobile now).
Some keyboards that have incorrectly added a .js into a package, e.g.
sil_cipher_music, will be marked as supporting mobile even though they
don't. The correct fix here is to remove the .js from the package for
that keyboard.
The focus code paths for Chromium frames (CEF4Delphi) were incorrect.
The return value for preventing focus on navigation events was
inverted, and then other code was attempting to work around this
inversion, wrongly. Fixed the root issue of the inverted test (it would
help if the parameter cefSetFocus was known as `Handled` rather than
`Result`!) and then the remaining code pathways became far simpler.
Fixes#2314.
If the On Screen Keyboard was closed when on a monitor other than the
primary monitor, it would restore to the primary monitor in the top-
left corner instead of the previous location.
This fix allows the OSK to be restored to another monitor, but still
avoids positioning the window off screen if the monitor has been
disconnected.
Fixes#2270.
Fixes#2147.
This potentially addresses the issues reported in #2147 where Keyman
would crash due to a race condition as a critical section was not
deleted before attempting to recreate it.
Some logging has been added for debugging these issues.
Also fixes memory leaks and another race on startup relating to loading
the taskbar icon.
There are still some known memory leaks because DLL_THREAD_DETACH is
not called for all threads before keyman32.dll is unloaded, so those
threads don't get the opportunity to clean themsselves up. However, the
key danger with the csGlobals critical section has been addressed.