Commit graph

10774 commits

Author SHA1 Message Date
Marc Durdin
62bcd8166c fix(windows/config): keyboard icons missing
Keyboard icons were not showing in Keyman Configuration.
2020-12-21 15:26:42 +11:00
Marc Durdin
e664e93de7 fix(windows): Improve refresh reliablilty
This change has three fixes to improve the reliability of notifying
Keyman Engine of updates to settings or keyboard installs:

1. It removes the closure pattern of the refresh thread, because that
   was closing on a variable on a different thread (`RefreshHandle`) and
   that could cause races and/or exceptions in the case of early free.
   What's more, the closure was actually unnecessary as the variable was
   really only used by the refresh thread!

2. It moves responsibility for setting the refresh token to the calling
   thread so that the caller can depend on the token being the one that
   is actually sent, removing a race.

3. Most important, the refresh thread now flushes all messages in its
   queue, as there may be multiple messages relating to the window
   construction that need to be processed before the wm_keyman_refresh
   message can be handled. This greatly improves the chance of the
   notification actually being sent!
2020-12-18 08:06:03 +11:00
Marc Durdin
d6290e6373 fix(windows): Show full version with tag in Setup
Fixes #4041.

Show the version with tier and build flags in Setup so that it is clear
which version of Keyman will be installed, as the Keyman version can be
distinct from the setup.exe version.

Constructs the version tag from version+stability data in the
UpdateCheckResponse and uses a new MSI property called VersionWithTag
for Windows Installers. Older MSIs will still show a.b.c.d versions
instead of the tagged version if they are checked locally (as opposed to
online), because the new VersionWithTag property will not be present.
2020-12-17 15:01:37 +11:00
Marc Durdin
b561dc4721 fix(windows): Use timer-approach to refresh
Another thought: we could also try refreshing every 125msec for 5
seconds after the first change is detected. It's a bit yuck perf-wise
but would probably be pretty transparent to the user.

In testing, this looks good. It means the changes appear as soon as
ready, without substantial delays or performance issues. Polling this
makes me feel a bit dirty, but I'll just take a shower and be okay.
2020-12-17 13:43:31 +11:00
Marc Durdin
f6872e7919 fix(windows): OSK toolbar sync
As Keyman now monitors the Windows keyboard list from Control Panel, it
is no longer sufficient to refresh the toolbar only when a Keyman
keyboard is updated, as at that point Windows has not refreshed its own
language list in the registry. Instead, we need to monitor changes to
the relevant registry key and then refresh when those changes are
'complete'.

There is a problem: there does not appear to be a good way to monitor
for changes to Windows language settings. WM_SETTINGCHANGE is sent when
a language is added by the user in Settings, but the actual change
happens asynchronously, and we are not notified when the changes are
complete.

We also do not get notifications when languages are added via APIs.

Given the async nature of the language profile changes, this leads to
race conditions when we try to refresh the OSK toolbar. My preferred
solution currently is to monitor the relevant key in a separate thread,
and wait 1 second post-changes to actually do the refresh.
2020-12-17 13:23:05 +11:00
Marc Durdin
f73b2912ef fix(windows): exception handling list error
Fixes #4006.

This fixes the list error exception which was masking the actual cause
of #4006, which is already fixed by #4164.

Related issue #4119 is also fixed by #4164.
2020-12-17 11:54:39 +11:00
Marc Durdin
1d850ab623 chore(windows): commit headers 2020-12-17 11:54:06 +11:00
Marc Durdin
15d2182255 fix(windows): maintain use of refreshtag 2020-12-17 11:19:13 +11:00
Marc Durdin
cea564a072 fix(windows): Improve refresh performance
When a keyboard is installed, Keyman will now only refresh its internal
state on a given thread when that thread receives focus and/or input,
rather than immediately. This will dramatically reduce the chatter
caused by Keyman Engine when a keyboard is installed or settings are
changed.
2020-12-17 11:13:18 +11:00
Marc Durdin
17b444bff2 fix(windows): Settings refresh management
Fixes #4011.
Fixes #4039.
Fixes #4121.

This change completes the immediate-change model for Keyman
Configuration, by refactoring the refresh of settings out of the render
phase and more appropriately splitting applying and refreshing. It adds
a new message flag for wm_keyman_refresh, KR_SETTINGS_CHANGED, which
uses a random token approach broadcast to all applications on the
desktop to ensure that the refresh is received and multiple
notifications for the same event can be appropriately coalesced.

Most of the files touched are stripping out the refresh flags from the
render phase.

There is one small bug resolved at the same time with the options
properties, which were not reset to default if they had been deleted
from the registry prior to a refresh (see utilkeymanoption.pas).
2020-12-17 10:50:21 +11:00
Marc Durdin
64d618cb58
Merge branch 'beta' into fix/windows/3749-3759-max-transient-languages 2020-12-16 09:32:00 +11:00
Marc Durdin
246cb70840 fix(windows): Warn if we reach maximum transient languages
Fixes #3749.
Fixes #3759.

Adds a warning dialog when user attempts to add a transient language to
a keyboard but the maximum number of transient languages is already
installed.

If this issue arises when a user is installing a keyboard for the first
time, Keyman instead installs the keyboard for the user's default
language. This may be a little confusing, but the error condition is
difficult to explain and non-technical users will probably be stuck
and need to install under their default language in any case. Happy to
receive any pushback on this decision.
2020-12-16 09:09:19 +11:00
Marc Durdin
2e7f123ab4
Merge pull request #4149 from keymanapp/fix/windows/4008-text-editor-font-bugs
fix(windows): Text editor font bugs
2020-12-16 07:25:16 +11:00
Marc Durdin
5f97bc8b5b
Merge pull request #4147 from keymanapp/fix/windows/4004-help-window-centered
fix(windows): help window centred on load
2020-12-16 07:25:08 +11:00
Marc Durdin
658e95f92b
Merge pull request #4144 from keymanapp/fix/windows/4111-canonical-bcp47-on-download
fix(windows): Canonicalize BCP 47 tag on keyboard download
2020-12-16 07:24:57 +11:00
Marc Durdin
b3f21bb20c
Merge pull request #4141 from keymanapp/fix/windows/4113-remove-obsolete-option
fix(windows): remove obsolete option 'Switch to OSK/Help'
2020-12-16 07:24:48 +11:00
Marc Durdin
5fe4e4c7ad
Merge pull request #4140 from keymanapp/fix/windows/4012-menu-scroll-not-reset
fix(windows): menu scroll positions need reset at popup
2020-12-16 07:24:36 +11:00
Marc Durdin
6a6ca3f853
Merge pull request #4139 from keymanapp/fix/windows/4112-menu-glitch
fix(windows): glitch in keyboard menu
2020-12-16 07:24:25 +11:00
Marc Durdin
8bef1290e0
Merge pull request #4138 from keymanapp/chore/windows/4042-remove-importkeyboard
chore(windows): remove obsolete importkeyboard app
2020-12-16 07:24:16 +11:00
Keyman Server
d10be475c0
Merge pull request #4151 from keymanapp/auto/version-beta-14.0.211
auto: increment beta version to 14.0.211
2020-12-15 15:34:55 +11:00
Keyman Build Agent
686db730be auto: increment beta version to 14.0.211 2020-12-14 23:34:08 -05:00
Marc Durdin
c39e93d9d2
Merge pull request #4142 from keymanapp/fix/windows/beta-uses-wrong-server
fix(windows): beta uses wrong server
2020-12-15 15:26:40 +11:00
Marc Durdin
a56ba3ce20 chore: fixup guid 2020-12-15 14:39:09 +11:00
Marc Durdin
1046a84328 chore: fix oopsie 2020-12-15 14:37:22 +11:00
Marc Durdin
82719788e5 fix(windows): Text editor font bugs
Fixes #4008.

Fixes issue of font helper popping out separately and secondary crash,
as well as the font helper not actually working because the font data
was never passed in.

In the future, we could improve this by moving the font enumeration into
the back end web server thread but that's a bigger refactor and not
appropriate for beta.
2020-12-15 14:31:38 +11:00
Marc Durdin
06b96400f5 fix(windows): help window centred on load
Fixes #4004.

Centres the help window when it first appears.

There is still a small resizing event but that will be handled with a
separate PR for #3765.
2020-12-15 13:58:53 +11:00
Marc Durdin
cf2a0ecc60 fix(windows): Canonicalize BCP 47 tag on keyboard download
Fixes #4111.

The keyboard tag passed in from search would  often be missing a region
tag which is required on Windows.
2020-12-15 12:28:57 +11:00
Marc Durdin
32d9fc78d1 chore(windows): rename variables 2020-12-15 12:21:20 +11:00
Marc Durdin
895cd8b375 fix(windows): beta uses wrong server 2020-12-15 12:11:11 +11:00
Marc Durdin
49de5cffd2 fix(windows): remove obsolete option 'Switch to OSK/Help'
Fixes #4113.

The option "Switch to On Screen Keyboard/Help automatically when a
keyboard is selected" is obsolete and we should remove it from the UI.

Note that this does not remove the API surface, just hides the option
from view, as there may be apps relying on the API value.

Not touching help just now as that will be addressed in a help update
in the future.
2020-12-15 11:58:42 +11:00
Marc Durdin
ad932cdb74 fix(windows): menu scroll positions need reset at popup
Fixes #4012.

If the menu previously was scrollable, then it would potentially show
items at the wrong offset because the offsets were not reset when the
menu popup was called if no scroll was needed.
2020-12-15 11:46:30 +11:00
Marc Durdin
80d8169a4e fix(windows): glitch in keyboard menu
Fixes #4112.

Glitch in keyboard menu from scrollable buttons being drawn at top-left.
2020-12-15 11:44:59 +11:00
Marc Durdin
900eef7945 chore(windows): remove obsolete importkeyboard app
Functionality has been ported to kmconvert.

Fixes #4042.
2020-12-15 11:20:09 +11:00
Keyman Server
4c31ee69ee
Merge pull request #4136 from keymanapp/auto/version-beta-14.0.210
auto: increment beta version to 14.0.210
2020-12-15 08:17:59 +11:00
Keyman Build Agent
bc0bd37123 auto: increment beta version to 14.0.210 2020-12-14 16:17:15 -05:00
Marc Durdin
c68e767eba
Merge pull request #4135 from keymanapp/chore/common/retrigger-beta
chore: fix trigger for beta branches
2020-12-15 08:15:37 +11:00
Marc Durdin
85fd8a53d9 chore: fix trigger for beta branches 2020-12-15 08:14:57 +11:00
Keyman Server
b44780fe57
Merge pull request #4134 from keymanapp/auto/version-beta-14.0.209
auto: increment beta version to 14.0.209
2020-12-15 08:06:41 +11:00
Keyman Build Agent
d5648fa418 auto: increment beta version to 14.0.209 2020-12-14 16:05:54 -05:00
Marc Durdin
e150e66186
Merge pull request #4133 from keymanapp/chore/common/retrigger-beta
chore: re-trigger beta
2020-12-15 08:03:49 +11:00
Marc Durdin
4cc830a918 chore: re-trigger beta 2020-12-15 08:03:03 +11:00
Keyman Server
8eda2c72cf
Merge pull request #4132 from keymanapp/auto/version-beta-14.0.208
auto: increment beta version to 14.0.208
2020-12-15 07:55:15 +11:00
Keyman Build Agent
b993ef3056 auto: increment beta version to 14.0.208 2020-12-14 15:54:24 -05:00
Marc Durdin
87f319ace7
Merge pull request #4131 from keymanapp/fix/common/build-trigger-definitions
fix: build trigger definitions
2020-12-15 07:49:50 +11:00
Marc Durdin
af4a04ff47 fix: build trigger definitions 2020-12-15 07:48:11 +11:00
Keyman Server
d7646d75bb
Merge pull request #4130 from keymanapp/auto/version-beta-14.0.207
auto: increment beta version to 14.0.207
2020-12-15 07:46:13 +11:00
Keyman Build Agent
9c34cbcc5a auto: increment beta version to 14.0.207 2020-12-14 15:45:28 -05:00
Marc Durdin
b52d162a4c chore: update tier 2020-12-15 06:43:19 +11:00
Marc Durdin
ddf3c4b517
Merge pull request #4128 from keymanapp/chore/android/new-versioncode-system
chore(android): rework versionCode system
2020-12-15 06:32:28 +11:00
Marc Durdin
9798f86b16 chore(android): rework versionCode system
We now generate a versionCode directly from the release version number,
and this is what we use for Google Play Store to ensure that we have
an always-incrementing version number.
2020-12-15 06:31:01 +11:00