spiegel-keyman/windows/src/engine/keyman/viskbd
Marc Durdin fbcfd62678 fix(windows): refactor controller windows
Fixes #5004.

This cleans up the use of controller windows. A single window is now
given the responsibility of being the master controller, which receives
messages from Keyman32 and other components around UI activation, active
keyboard, etc.

The master controller is keyman.exe's `TApplication` window, which does
not get destroyed and recreated, unlike the main form window.

Any thread which has responsibility for Keyman UI (keyman.exe main
thread, keymanx64.exe main thread) is also registered as a controller
thread. A controller thread has special handling for interactions with
keyman32 around focus tracking.

Caveats:

* While keymanx64 does not have a visible window and thus probably does
  not need to be registered as a controller thread, it doesn't really
  hurt.
* Note that keymanx64 registers the 32-bit controller thread as well,
  which again is probably unnecessary as the 64-bit process cannot
  interact with the 32-bit thread.
* Keyman's main form still handles wm_keyman_control messages, as there
  are a number of other components which post to that window (e.g. text
  editor, com library visual keyboard interactions). Unlike the original
  problem trigger, the reference handle is not stored long-term and so
  there is unlikely to be a problem with main form window re-creation
  causing an issue in these contexts.

There are several TODO items in this which I will address in follow-ups,
to reduce the scope of these changes.

I hope to cherry-pick this to stable-14.0, but will run for a while in
15.0 before doing so.
2021-05-11 14:47:17 +10:00
..
UfrmOSKCharacterMap.dfm Keyman Desktop and Keyman Developer open source 10.0 alpha seed (#121) 2017-07-25 10:53:06 +07:00
UfrmOSKCharacterMap.pas x64 support for COM API - first steps: build of kmcomapi.dll for x64, and rename of registry keys 2017-12-24 13:47:56 +07:00
UfrmOSKEntryHelper.dfm Keyman Desktop and Keyman Developer open source 10.0 alpha seed (#121) 2017-07-25 10:53:06 +07:00
UfrmOSKEntryHelper.pas Keyman Desktop and Keyman Developer open source 10.0 alpha seed (#121) 2017-07-25 10:53:06 +07:00
UfrmOSKFontHelper.dfm fix(windows): more i18n cleanup: 2020-07-29 08:03:30 +10:00
UfrmOSKFontHelper.pas chore(windows): breadcrumbs 2021-03-16 06:57:57 +11:00
UfrmOSKOnScreenKeyboard.dfm Keyman Desktop and Keyman Developer open source 10.0 alpha seed (#121) 2017-07-25 10:53:06 +07:00
UfrmOSKOnScreenKeyboard.pas [Windows] Basic infrastructure for chromium in place; builds I think 2019-04-09 05:41:58 +07:00
UfrmOSKPlugInBase.dfm Keyman Desktop and Keyman Developer open source 10.0 alpha seed (#121) 2017-07-25 10:53:06 +07:00
UfrmOSKPlugInBase.pas Keyman Desktop and Keyman Developer open source 10.0 alpha seed (#121) 2017-07-25 10:53:06 +07:00
UfrmVisualKeyboard.dfm feat(windows): overflow menu for osk toolbar 2020-09-27 13:07:45 +10:00
UfrmVisualKeyboard.pas fix(windows): refactor controller windows 2021-05-11 14:47:17 +10:00