Commit graph

3486 commits

Author SHA1 Message Date
Marc Durdin
8414f06fc6 fix(developer): Respect tab editor option
Fixes #1692.

The wrong option was being set -- not sure how this was missed earlier!

Also ensures that TSV files will always use Tabs, regardless of the
global setting.
2020-12-22 13:07:40 +11:00
Marc Durdin
583f4b46cb chore(windows): address review comments 2020-12-22 12:44:11 +11:00
Marc Durdin
718c19a80c fix(developer): Encoding for .model.ts files
Fixes #3000.

The model editor would save .model.ts files with Windows-1252 (aka ANSI)
encoding, losing non-ANSI characters in the process.

While fixing this, noted that the class member `model` was not being
used apart from in Load (no longer in Save), so reduced its
scope accordingly.
2020-12-22 12:30:22 +11:00
Marc Durdin
a5da8fde47
Merge pull request #4159 from keymanapp/fix/windows/4007-proxy-config-window-size
fix(windows): Proxy Configuration window size
2020-12-22 11:59:31 +11:00
Marc Durdin
dfe5aa5745 fix(developer): make touch layout editor source view fonts consistent
Fixes #1724.
2020-12-22 11:42:50 +11:00
Marc Durdin
c5ea3a5db6 chore(common): update copyright year in various locations 2020-12-22 10:56:55 +11:00
Marc Durdin
ed6f6bcf00
Merge pull request #4177 from keymanapp/fix/windows/4057-keyboard-help-missing
fix(windows): keyboard help missing
2020-12-22 06:14:02 +11:00
Marc Durdin
b45e8e9966
Merge pull request #4182 from keymanapp/fix/windows/4001-modifier-key-in-download-dialog
fix(windows): prevent modifier key from navigating in download dialog
2020-12-22 06:13:55 +11:00
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
9d19cab784 chore(windows): Remove silent exception in task cleanup 2020-12-21 15:07:34 +11:00
Marc Durdin
5a661112a6 fix(developer): Map symbols for *LTREnter* and *LTRBkSp*
Fixes #4015.

Maps `*LTREnter*` and `*LTRBkSp*` to the correct symbols on the
touch layout builder.
2020-12-21 14:57:45 +11:00
Marc Durdin
63aadfb497 fix(developer): debug.log created unexpectedly
Fixes #4110.

CEF will create a debug.log file in the current folder if it encounters
an error. Instead, it should be written to Keyman's diag folder. This
fix is for both Keyman Developer and Keyman for Windows.
2020-12-21 14:52:05 +11:00
Marc Durdin
95a6e1b446 fix(windows): fixup mitigation for legacy keyboards
Fixes #4184.

If a package had a keyboard with language metadata, it would not
load that language data correctly, which then meant it would not
apply the mitigation correctly either, leading to a double elevation
dialog as Keyman tried to fallback to primary language.
2020-12-21 11:23:53 +11:00
Marc Durdin
ea2124266c fix(windows): prevent modifier key from navigating in download dialog
Fixes #4001.

Stops navigation while holding Ctrl or Shift key taking over the whole
dialog rather than staying within the iframe.
2020-12-21 09:56:29 +11:00
Marc Durdin
6289c6ecea fix(windows): create task fails
Relates to #4116. This may not yet fix the issue; I don't have enough detail
to be sure of what the precise problem is. I have added one change to add a
username to the task definition, which may make a difference; and I will be
monitoring the more fine-grained exception reporting if that doesn't fix the
problem.
2020-12-21 09:14:37 +11:00
Marc Durdin
227e023cdd fix(windows): disable mitigation for Windows 10 build 19597 and later
Fixes #1285.

If running Windows 10 19597 or later, the underlying issue has
been addressed, so disable the mitigation for new installs of
the keyboard. Does not attempt to change the language code if
the keyboard is already installed.
2020-12-21 08:56:34 +11:00
Marc Durdin
e9723251fb fix(windows/engine): Build 19597 update
Build 19597 of Windows 10 no longer causes the issue with Amharic,
Tigrinya and Sinhala keyboards failing to register and activate
correctly.
2020-12-21 08:23:51 +11:00
Marc Durdin
e83061ef80 fix(windows): ensure mitigation works with new registration strategy
The keyboard profile and registration strategy was not taking into
account the mitigation for Win10 1803 (#1285) and this meant that the
Amharic, Tigrigna and Sinhala keyboards would not install correctly.
2020-12-21 08:20:28 +11:00
Marc Durdin
6b8ca56d10 fix(windows): keyboard help missing
Fixes #4057.

Keyboard help link was missing from the help dialog
when instantiated from Keyman menu or OSK.
2020-12-20 06:19:43 +11:00
Marc Durdin
adfce714c2
Merge pull request #4157 from keymanapp/fix/windows/3749-3759-max-transient-languages
fix(windows): Warn if we reach maximum transient languages
2020-12-20 05:42:22 +11:00
Marc Durdin
3992a34ff4 chore(windows): don't change debug-manifest 2020-12-19 07:50:50 +11:00
Marc Durdin
2dd28f5cc3 fix(windows): ensure win7 compat, extra 2020-12-19 07:49:05 +11:00
Marc Durdin
9e06fc89a5 fix(windows): ensure win7 compat 2020-12-19 07:47:29 +11:00
Marc Durdin
1a80290fee fix(windows): fix menu popup position
Fixes #4013.

This turned out to be a lot more complicated than I expected, mostly due
to limitations in the Windows Shell API with regard to multiple monitors
and per-monitor DPI awareness (which we don't yet do in Keyman -- a
task for another day). Some of the Shell API functions are also
re-entrant, which is dangerous, so I avoided using those.

We now popup the menu relative to the Keyman icon far more precisely
which gives a much nicer feel to the menu interaction.
2020-12-19 07:31:17 +11:00
Marc Durdin
22d191f16a
Merge pull request #4158 from keymanapp/fix/windows/4002-tsysinfo-missing-symbolication
fix(windows): sentrytool should fail build on exception and access violation when rewriting executables
2020-12-18 14:22:27 +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
02cc3ebc61
Merge pull request #4152 from keymanapp/fix/windows/4040-online-update-dialog-messy
fix(windows): Online Update dialog layout was messy
2020-12-18 07:55:35 +11:00
Marc Durdin
2a4a1887d9
Merge pull request #4150 from keymanapp/fix/windows/4000-exit-button-position
fix(windows): exit button position on setup
2020-12-18 07:55:25 +11:00
Marc Durdin
07f2feb1a5
Merge pull request #4145 from keymanapp/fix/windows/4009-uninstall-button-zindex
fix(windows): uninstall language button z-index
2020-12-18 07:55:16 +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
d8fcdb5398 chore(windows): additional files 2020-12-17 11:16:26 +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
90b8b379be fix(windows): kmconfig sentrytool typo 2020-12-16 11:47:05 +11:00
Marc Durdin
023a70aadd fix(windows): sentrytool fails on mem realloc
Fixes #4002.

We needed to reseat the pointers after the realloc as the base address
changed; this only affected us occasionally but nasty when it did!
2020-12-16 11:34:39 +11:00
Marc Durdin
53bad857cb fix(windows): Proxy Configuration window size
Fixes #4007.

Proxy Configuration window is now the right size and focuses the Server
text box appropriately.
2020-12-16 09:47:18 +11:00
Marc Durdin
e571113b22 fix(windows): sentrytool should fail build on exception
This does not fix the core issue. Examining the logs shows that
sentrytool is failing with an access violation when running on the
build agent, although it works on my local machine. This first step
is to get the build to fail, and then I will test again directly on the
build agent.
2020-12-16 09:35:09 +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