Commit graph

287 commits

Author SHA1 Message Date
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
9e46b555d9 fix(windows): Rename to Keyman
Fixes #4003.

This addresses the majority of locations where we use the name "Keyman
Desktop" in code. There will be some filenames and paths that do not
change at this point -- particularly at a source level. For now, the
focus is on the user interface changes.

While making these changes, I also made the VERSION and MANIFEST
resources more consistent.
2020-12-02 09:56:14 +11:00
Marc Durdin
7ccde0e3ed chore(windows): disable Sentry 'Started' event
We used the 'Started' event when testing Sentry integration. We no
longer need it, but I left it in as commented code so we can re-enable
if/when we do Sentry updates in the future and need to re-test.
2020-12-01 10:45:22 +11:00
Marc Durdin
bbfe5adcc8 fix(windows): crash with package online update
Fixes #4005.

The wrong object was being freed which caused an access violation
internally.
2020-12-01 10:15:05 +11:00
Marc Durdin
79cd83e105 chore(windows): fixup makefiles 2020-11-11 10:33:18 +11:00
Marc Durdin
00a9744253 chore(windows): symbol server support, initial steps 2020-11-11 10:33:16 +11:00
Marc Durdin
3d1601ffe5 fix(windows): SizeOfImage header was wrong for dbg
Fixes #3831.

This fixes both issues reported in the bug (dproj changes ensure
separate .tds, and Makefile changes fix order of execution so that
dbg is generated after sentryprep's cleanup).
2020-11-06 17:36:56 +11:00
Marc Durdin
94a062f20a fix(developer): remove obsolete NRSIAllTags
Relates to #799.

Removes NRSIAllTags, alltags.txt, parser and utility units.

Also re-enables standardsdata.dpr unit test which needed some syntax
cleanup.
2020-11-04 18:41:17 +11:00
Marc Durdin
fd5845a912
Merge pull request #3805 from keymanapp/fix/windows/3801-crash-installing-malformed-package
fix(windows): crash installing package with a race
2020-10-30 17:31:23 +11:00
Marc Durdin
76f77857c5 fix(windows): crash installing package with a race
Fixes #3801.
Fixes #3802.
Fixes KEYMAN-WINDOWS-5M.
Fixes KEYMAN-WINDOWS-5N.

This is a two-part fix for Keyman Configuration where it appears there
was a race with creating a temporary file, and which caused a cascading
exception.

The first part resolves the race; the second part (in
UfrmInstallKeyboard.pas) adds a little extra robustness (probably not
totally necessary).
2020-10-30 16:52:17 +11:00
Marc Durdin
99e44d030a fix(windows): keyboard menu could get out of sync
Fixes #3725.
Fixed #3783.

In some situations, the keyboard menu would either display empty or
would not refresh to get all installed keyboards.
2020-10-30 14:22:20 +11:00
Marc Durdin
5a4287a68d fix(windows): disabling/enabling a profile could have wrong association
Transient language profiles would get the wrong language association
when they were disabled and re-enabled.

Fixes #3798.
2020-10-30 14:20:00 +11:00
Marc Durdin
4b970fefbf
Merge pull request #3779 from keymanapp/fix/windows/3650-remove-msctf-dllmain-free
fix(windows): remove msctf free from DllMain
2020-10-29 06:43:49 +11:00
Marc Durdin
3178495e58
Merge pull request #3772 from keymanapp/fix/windows/3562-start-keyman-on-demand-keyman32
fix(windows): Start Keyman on Demand - keyman32
2020-10-29 06:43:42 +11:00
Marc Durdin
fc7b51c4ca fix(windows): remove msctf free from DllMain
Fixes #3650.

This removes the bad call to `FreeLibrary` that was still present in
a callee of `DllMain` in keyman32. The refactor moves responsibility for
loading TSF to the `SelectKeyboard` functions and gets rid of the
associated thread globals.

The `TSFINTERFACES` struct is of course a future candidate for a class.

In the process I removed a lot of cruft from keyman32.cpp which was
either obsolete, irrelevant or just plain wrong. None of which had
material impact on the running code.
2020-10-28 16:17:52 +11:00
Marc Durdin
3e9f397b27 chore(windows): small cleanups
1. Remove unused variables
2. Remove invalid build configurations
3. Move hotkey checks before touch keyboard panel check, so hotkeys
   still work when touch panel is active; the touch keyboard panel check
   is there to disable serialised input which conflicts with it.
2020-10-28 10:27:24 +11:00
Marc Durdin
c66eb49163 fix(windows): Start Keyman on Demand - keyman32
This is the first half of a two-part update to Keyman for Windows. There
are two significant changes here. These changes apply to
keyman32/keyman64, as well as kmtip/kmtip64, but will refer to the
32-bit equivalents for simplicity:

1. Instead of using `GetProcAddress` to connect to keyman32.dll, we
   now have an import library connection. This removes one particularly
   suspect piece of architecture for Keyman, as using `GetProcAddress`
   could lead to a race condition, where keyman32.dll is unloaded after
   that function is called but before we use the handle. This makes the
   kmtip.dll build dependent on keyman32.dll; loading kmtip.dll (by
   selecting a Keyman input method) also loads keyman32.dll.

2. It's not enough (yet) to load kmtip.dll. We also need to be running
   keyman.exe itself, due to global hooks that we still require (it may
   be possible, one day, to avoid these, but it doesn't look very
   hopeful). To that end, kmtip calls new function `TIPIsKeymanRunning`
   to check whether keyman32.dll is initialised (and hence keyman.exe
   has initialised it). Then, if keyman.exe is not running, it issues an
   event to the Windows Event Log, which we will pick up with a
   scheduled task in the next PR.

The first part of this is an architectural change which may lead to some
change in behaviours, as keyman32.dll now may not be unloaded from a
process when keyman.exe exits, due to the lock that kmtip.dll now has on
it. It will be important to test this (@MakaraSok) by running through
various startup and shutdown scenarios. In my initial testing, I found
that there were some situations after restarting keyman.exe where I
needed to switch in and out of the Keyman TIP, but those were not all
critical.

This change also lays groundwork for an eventual ability to run the
Keyman input method without keyman.exe running, which will be helpful
e.g. on login screen, even if missing certain additional functionality
such as the serialised input queue.
2020-10-28 06:10:22 +11:00
Marc Durdin
7a722639bb
Merge pull request #3753 from keymanapp/fix/windows/3518-config-auto-apply
fix(windows): Keyman Configuration changes apply instantly
2020-10-27 13:07:26 +11:00
Marc Durdin
79b41d0627
Merge pull request #3754 from keymanapp/fix/windows/remove-double-refresh
fix(windows): Remove double refresh
2020-10-27 10:38:25 +11:00
Marc Durdin
4269a4dbc4 fix(windows): Remove double refresh
Both the win32 and the win64 keyman engine libraries would receive a
refresh notification, and then they'd both broadcast the change. This
change limits the broadcast responsibility to the 32-bit engine.
2020-10-26 15:26:08 +11:00
Marc Durdin
11a2cf53c5 fix(windows): Keyman Configuration changes apply instantly
Fixes #3518.

Changes in Keyman Configuration will now apply immediately. This removes
the OK and Cancel buttons from the dialog and means that all actions
are consistent in when they are applied, unlike previously. This also
matches the Windows 10 Settings metaphor and metaphors for most modern
apps and devices.

For now, I have placed a message where the OK and Buttons were
previously, to help existing users understand the change. In time, I
expect us to be able to remove that message entirely.
2020-10-26 15:18:04 +11:00
Marc Durdin
82e15bead0 fix(windows): remove obsolete Reboot flag
The Reboot flag was never set by any Keyman code any longer. Thus,
removing to simplify code pathways for applying config changes.
2020-10-26 09:10:02 +11:00
Marc Durdin
0ab49191d8 fix(windows): buffer overrun in debug function 2020-10-24 14:46:19 +11:00
Marc Durdin
2da01e2210
Merge pull request #3727 from keymanapp/fix/windows/tsysinfo-clearer-upload-failure
fix(windows): improve tsysinfo upload messages
2020-10-22 14:49:24 +11:00
Marc Durdin
3d324b20aa
Merge pull request #3719 from keymanapp/fix/windows/3694-tweak-scrolling-in-keyboard-menu
fix(windows): tweak scrolling in keyboard menu
2020-10-20 18:31:21 +11:00
Marc Durdin
9ab40d9b48 fix(windows): improve tsysinfo upload messages
If tsysinfo fails to upload a diagnostic report, give more detail on
what happened.
2020-10-20 18:18:57 +11:00
Marc Durdin
929e32601c chore(windows): remove debug code 2020-10-19 16:33:59 +11:00
Marc Durdin
3935699262 fix(windows): tweak scrolling in keyboard menu
Fixes #3694.

The keyboard menu would sometimes scroll too far, which could be
confusing for the end user. This fix stops the scroll once the last
item is in view; it also tweaks the down arrow key handler to ensure
that the current item is correctly scrolled into view.
2020-10-19 16:31:08 +11:00
Marc Durdin
bc7b667f4d fix(windows): RefreshKeyboards loses some profiles
When loading transient language profiles, RefreshKeyboards would reset
the list of profiles (and in so doing, also leak memory). Instead, the
list should be cleared before the initial language profile list load.
2020-10-19 08:38:25 +11:00
Marc Durdin
3edec559ec fix(windows): disabled keyboards listed in hotkeys
Fixes #2942.
2020-10-09 11:13:11 +11:00
Marc Durdin
3c32267a50 chore: don't add tag to version in filenames
While it might be nice to add the tag to versions in filenames, this
creates a lot of work on the website where we make some filename
assumptions. So, this PR winds that detail of filename changes back,
and renames copydev.in to download.in to make it consistent with the
other download.in files.
2020-10-08 14:59:59 +11:00
Marc Durdin
facf94df26 chore: address review comments 2020-10-08 13:59:16 +11:00
Marc Durdin
c655c4eaf5 fix(windows): improve version numbers
Release build executables should have 3 component version numbers with
the version tag appended, e.g. keymandesktop-14.0.155-alpha-local.exe.

Coming later, rename keymandesktop-version.exe to keyman-version.exe.
2020-10-08 09:13:48 +11:00
Marc Durdin
f3d5fcbb28
Merge pull request #3668 from keymanapp/fix/windows/cherry-pick/3665-metro-apps-compat
fix(windows): Some registry keys could have incorrect permissions 🍒
2020-10-08 06:20:59 +11:00
Marc Durdin
258e4b4eff fix(windows): Some registry keys could have incorrect permissions
Fixes #3665.

On some systems, subkeys of HKCU\Software\Keyman could have incorrect
permissions and these would not be corrected with earlier fixes such as
in #2316. This fix resolves the problem by recursively correcting
permissions on all subkeys, rather than just the top two levels.

This issue caused Metro-style applications (Windows Store apps) to fail
to accept Keyman keyboard input.
2020-10-07 11:50:37 +11:00
Marc Durdin
53a197fba5 chore(windows): Move to Windows SDK 10.0.17763.0
This removes the requirement for the Windows 8.1 SDK.
2020-10-05 14:11:34 +11:00
Marc Durdin
0275f13e6c
Merge pull request #3649 from keymanapp/fix/engine/coverity-keyman32
fix(windows): coverity reports for keyman32
2020-10-05 13:47:08 +11:00
Marc Durdin
1d4307b2e9
Merge pull request #3642 from keymanapp/fix/engine/coverity-kmtip
fix(windows): coverity reports for kmtip
2020-10-05 13:46:59 +11:00
Marc Durdin
c83eb6f727
Merge pull request #3641 from keymanapp/fix/engine/coverity-mcompile
fix(windows): coverity reports for mcompile
2020-10-05 13:46:49 +11:00
Marc Durdin
7f70c14b2a fix(windows): Cast HANDLE types using PtrToInt 2020-10-05 09:30:55 +11:00
Marc Durdin
0406cb1381 fix(windows): coverity reports for keyman32 2020-10-02 14:54:43 +10:00
Marc Durdin
f691946f1c fix(windows): coverity reports for kmtip 2020-09-30 17:20:36 +10:00
Marc Durdin
146dd0acc5 fix: coverity reports for mcompile 2020-09-30 14:53:47 +10:00
Marc Durdin
1df49317c9 fix(windows): coverity reports for mcompile 2020-09-30 14:50:22 +10:00
Marc Durdin
827ea6c386 fix(windows): upgrading disabled keyboards
Fixes #3561.

Resolves issues with upgrading disabled keyboards, and fixes a secondary
issue where Windows was giving us invalid LANGIDs for locales, which was
causing trouble with transient LANGIDs.
2020-09-29 20:25:10 +10:00
Marc Durdin
301a76c88a fix(windows): upgrading transitional profiles
Relates to #3561.

If a keyboard is installed for a transitional profile but another
keyboard is already installed for that profile, then Keyman would
crash, expecting the transitional profile to be missing.
2020-09-29 09:08:47 +10:00
Marc Durdin
5f59ee08ec chore(windows): make disabled arrows lighter 2020-09-28 15:05:58 +10:00
Marc Durdin
e34478c173 feat(windows): scrollable keyboard menu
Fixes #1843.

If there are so many keyboards installed that the menu would grow larger
than 3/4 of the screen height, then the menu will become scrollable.
2020-09-28 12:17:00 +10:00
Marc Durdin
d56567735e feat(windows): overflow menu for osk toolbar
Fixes #1659.

If there are too many keyboards to fit in the OSK toolbar, the toolbar
will now show a dropdown menu button and excess keyboards will be
visible there.
2020-09-27 13:07:45 +10:00
Marc Durdin
4fe1b16b1d fix(windows): cleanup hardcoded urls in tsysinfo
Relates to #3394.

Cleans up remaining hardcoded URLs in TSysInfo. Note that UfrmAbout.dfm
is removed because it is not used.
2020-09-25 11:11:14 +10:00