spiegel-keyman/windows/include
Marc Durdin 0e332b6f6c
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
fix(windows): simplify keyboard refresh and make it more on-demand
Clean up the keyboard refresh process. Keyman COM API will post a
`wm_keyman_refresh`, `KR_REQUEST_REFRESH` message when changes have been
made to the list of installed keyboards (or some other keyboard-related
settings change).

Keyman Engine (any arch) will handle this message, in any process, and
post a message to the master controller (keyman.exe, TfrmKeyman7Main),
`wm_keyman_refresh`, `KR_PRE_REFRESH`.

Keyman Engine (keyman32) will handle _this_ message in the master
controller thread context, and increment the global refresh tag. It also
asks the other architecture host process(es) to update their global
refresh counter to the same value (by posting `wm_keyman_refresh`,
`KM_PRE_REFRESH` to those process(es).)

This refresh tag is then compared on-demand in each thread to the
thread's current refresh tag value, when a keyboard activation is
received, on set focus, or on a keystroke, and the keyboard list is
refreshed at that point.

This means that keyboard installation no longer triggers a large amount
of activity reloading all the keyboards on all windowed threads, but
rather they will gradually reload as the user interacts with them. It
also fixes #15333, which related to having threads with only child
windows -- that is, that were parented by top-level windows from other
threads -- which thus never received the global broadcast in the earlier
design. For example, VSCode, Notepad in Win11, Chrome.

Fixes: #15333
2026-08-26 10:15:46 +02:00
..
keymancontrol.h fix(windows): simplify keyboard refresh and make it more on-demand 2026-08-26 10:15:46 +02:00
kmtip_guids.h chore(windows): move kmtip_guids.h and testkeymanfunctioning.h 2022-06-12 07:43:24 +10:00