Commit graph

3486 commits

Author SHA1 Message Date
Darcy Wong
391eb402f3 chore(common): Update crowdin strings for Simplified Chinese 2022-11-14 09:56:52 +07:00
Ross
578a9017f4 chore(windows): add unit test for SetupCoreEnvironment 2022-11-14 12:55:13 +10:00
Marc Durdin
c0e640fe73
Merge pull request #7710 from keymanapp/chore/windows/keyman-debug-symbols
chore(windows): include debug info in keyman build
2022-11-14 11:57:26 +11:00
Marc Durdin
1efe89b946
Merge pull request #7707 from keymanapp/chore/windows/report-errors-for-cust-init-better
chore(windows): Add safecall for internal CustomisationStorage API interface
2022-11-14 11:57:19 +11:00
Marc Durdin
350e4e2930
Merge pull request #7709 from keymanapp/fix/windows/7708-handle-timeout
fix(windows): handle timeout in downloads
2022-11-14 11:57:13 +11:00
Marc Durdin
d309d0e148
Merge pull request #7703 from keymanapp/chore/windows/add-sentry-traces-for-js-crashes
chore(windows): add sentry traces for unsolved crashes
2022-11-14 11:57:05 +11:00
Marc Durdin
2e58174092 chore(windows): include debug info in keyman build
Same as #7600, but for keyman.dpr.
2022-11-14 10:52:20 +11:00
Marc Durdin
c07ea36ec2 fix(windows): handle timeout in downloads
Fixes #7708.
2022-11-14 10:35:20 +11:00
Marc Durdin
ce93901a5f chore(windows): Add safecall for internal CustomisationStorage API interface
This makes it easier to track what is happening for errors where
otherwise we found that exception messages were being cropped; for
example, see KEYMAN-WINDOWS-X.

The error messages were being cropped because the exception handler was
in the exe module, but the exception was being raised in kmcomapi
module. When the exception was handled, the handler tested to see if
the exception object inherited from exemodule.Exception, but it was
inheriting from kmcomapi.Exception instead, and so it did not attempt
to load the message detail.

By adding `safecall` calling convention to `KeymanCustomisation`, we
move responsibility for handling the exception to the
`TKeymanAutoObject.SafeCallException` function, and we get full detail
for the exception.
2022-11-14 09:40:14 +11:00
Marc Durdin
fbd1a2e7a5 chore(windows): add sentry traces for unsolved crashes
Adds Sentry breadcrumbs for the following crash reports:
* KEYMAN-WINDOWS-62
* KEYMAN-WINDOWS-6H (? no reports in recent releases, so may be
  resolved)
* KEYMAN-WINDOWS-7J
* KEYMAN-WINDOWS-4R

The source of these crashes is hard to pinpoint, so hoping that this
additional data sheds some light.
2022-11-14 07:21:22 +11:00
Marc Durdin
0eb39dc9ea fix(windows): click in 1 pixel high box in Language Switch window caused crash
Fixes #7698.

Due to a `>` instead of a `>=` check, there was a one pixel high box at
the bottom of each list of input methods for each language which would
reuslt in an invalid value for `FNewHoverKeyboard`
(`lang.KeyboardCount`).

As well as fixing this, I changed the result for clicking below the
input method list to the more logical last item in the list rather than
the first.
2022-11-12 10:23:32 +11:00
Marc Durdin
250fa86634 chore: Merge branch 'master' into chore/beta-to-master-b16s1 2022-11-11 16:12:46 +11:00
Marc Durdin
cb9d1589c2 fix(windows): make sure IdStackWindows finalizes after Vcl.Forms
Fixes #7690.

When kmshell.dpr is being shut down by Windows via `WM_ENDSESSION`, the
order of termination of units through `finalization` sections means that
`IdStackWindows` was finalizing while components were still depending on
it, causing a cascade of exceptions resulting eventually in the crash
visible in #7690.

We saw this when there were message loops before `Application.Run` had
ever been called. For example, message box/dialog, ShellExecute (yep...
this can do a `PeekMessage`), `THttpUploader` (which calls
`Application.ProcessMessages`) and probably others.

Ideally, it would be better to always call `Application.Run`, but it is
not safe to call `Application.Run` more than once, because it ends up
adding multiple `DoneApplication` exit procs, which would likely cause
other crashes.

I landed on the somewhat heavy-handed solution of adding
`IdStackWindows` to the start of the project `uses` list, ensuring it is
the last unit to be finalized -- importantly, before `Vcl.Forms`. A
better solution would be to find a way of ensuring that
`Application.Run` is called, just once, in all situations, but this is
likely to be hard to achieve. The shutdown sequence for Delphi apps is
so very, very fragile.
2022-11-11 13:03:47 +11:00
Marc Durdin
6e07877675 chore(windows): set platform core env explicitly
Fixes #7687.
2022-11-11 08:05:21 +11:00
Marc Durdin
52c9fde57a
Merge pull request #7667 from keymanapp/fix/windows/base-layout-support-in-core
fix(windows): base layout support in Keyman Core
2022-11-11 06:37:39 +11:00
Marc Durdin
4738b6a514 fix(windows): Improve shutdown robustness
Relates to KEYMAN-WINDOWS-B.

While this doesn't address the root cause of the exception, it should
prevent this unhandled exception, and adds breadcrumbs to help us see
which code path might be triggering the issue.
2022-11-10 16:10:49 +11:00
Marc Durdin
b087d22928 fix(windows): base layout support in Keyman Core
While Keyman Core already supported the base layout flags, they were not
being passed in from Keyman Engine for Windows. This meant that any
rules that used `baselayout` would fail, such as in sil_ipa with AltGr+0
for }

0bf72bed74/release/sil/sil_ipa/source/sil_ipa.kmn (L348-L350)

This patch adds support for the following properties:

* KM_KBP_KMX_ENV_BASELAYOUT: the legacy base layout name, e.g. kbdus.dll
* KM_KBP_KMX_ENV_BASELAYOUTALT: the BCP 47 base layout name, e.g. en-US
* KM_KBP_KMX_ENV_SIMULATEALTGR: whether the user has selected to emulate
  AltGr with Ctrl+Alt, for example on laptops without a right alt key.
* KM_KBP_KMX_ENV_BASELAYOUTGIVESCTRLRALTFORRALT: whether the system base
  layout in use generates Ctrl+RAlt when RAlt is pressed, which can be
  true for many European system layouts. This is necessary when
  associating the keyboard with a European language because the base
  keyboard becomes the language's default keyboard, rather than kbdus.
2022-11-10 11:26:44 +11:00
Ross
40c9a2aed1 fix(windows): add ASilent check for ShowMessage 2022-11-10 10:20:07 +10:00
rc-swag
d9e63c34f7
fix(windows): remove white space changes 2022-11-10 09:06:38 +10:00
Ross
ba7523f61f fix(windows): check kbd file is availabe to admin user 2022-11-10 07:57:27 +10:00
Marc Durdin
9a76e7a727 fix(windows): Cleanup CEF more correctly in shutdown
Hopefully fixes KEYMAN-WINDOWS-1MR, and probably many related crash
reports. Will monitor on alpha before porting to stable/beta.

This changes the form destruction sequence to make sure that it
doesn't close the form until CEF has been shutdown correctly.
2022-11-09 16:35:27 +11:00
Ross
329c3d340d fix(windows): add isValid check to package file 2022-11-08 16:15:34 +10:00
Marc Durdin
10549fdd78 fix(windows): include debug info in kmshell build
Should allow us to get line numbers for kmshell.exe crash reports
2022-11-02 15:52:10 +11:00
Ross
c05fc68c34 fix(windows): place TODO for file access check 2022-11-02 11:24:46 +10:00
Marc Durdin
fc6b496834 chore: update help version and whatsnew 2022-11-01 08:15:57 +11:00
Marc Durdin
d64bf82a35
Merge pull request #7206 from keymanapp/feat/windows/6296/configuration-ui-polish
feat(windows): configuration UI polish
2022-11-01 05:42:39 +11:00
Ross
d34d03d8bd feat(windows): fixed no hotkey boarder over lap
Reduced the css gridbox minium width and increased the overal
configuration windows minimum width.
Also add ms windows styling to add remove pop up.
2022-10-31 15:25:25 +10:00
Darcy Wong
d04893b638
Merge pull request #7558 from keymanapp/chore/help-16-0
chore(common): Update help references from 15.0 to 16.0
2022-10-28 07:32:04 +07:00
rc-swag
3146218fc7
Merge pull request #7546 from keymanapp/feat/windows/keyevent-as-private-wm-user-message
chore(windows): convert `wm_keyman_keyevent` and `wm_keyman_modifierevent` to private `WM_USER` messages
2022-10-28 09:33:14 +10:00
Darcy Wong
df0153f8f9
Merge pull request #7498 from keymanapp/chore/common/crowdin-nl
chore(common): Add crowdin strings for Dutch
2022-10-27 20:25:33 +07:00
Ross
db7c5837f1 feat(windows): Use opacity to reflect disabled keyboard 2022-10-27 22:30:08 +10:00
Ross
dce4304f17 feat(windows): select hotkey link on header stop propgation 2022-10-27 20:51:55 +10:00
Darcy Wong
263b04dce4 fix(windows): Fix language names 2022-10-27 16:18:16 +07:00
Ross
e7f840c5ab feat(windows): new shield icon for elevated config 2022-10-27 16:17:45 +10:00
Ross
74e764cd59 feat(windows): address review comments 2022-10-27 16:06:20 +10:00
Darcy Wong
5cf0ae6d64 chore(common): Update help references from 15.0 to 16.0 2022-10-27 13:05:38 +07:00
rc-swag
51e6dd8543
chore(windows): apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-10-27 09:03:22 +10:00
Ross
102f34ecb0 feat(windows): convert wm keyevent and to private wm user message
wm_keyman_keyevent and wm_keyman_modifierevent have been convert to use
the WM_USER message range and no longer global message
2022-10-26 15:34:12 +10:00
Ross
487b3cad9c feat(windows): Change "None" to "No Hotkey" matching new config
Change the label on the radio button for "Change Hotkey" dialogue
to "No Hotkey" to match the change to the windows configuration.
2022-10-26 11:27:32 +10:00
rc-swag
50a7733814
feat(windows): apply suggestions from code review
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2022-10-25 23:36:23 +10:00
Darcy Wong
1bc6e6a06f chore(common): Update crowdin strings for 16.0 2022-10-25 11:33:44 +07:00
Darcy Wong
081c23c798 chore(common): Add crowdin strings for Dutch 2022-10-20 09:42:56 +07:00
Ross
53ae794877 feat(windows): code style consistency in css 2022-10-20 12:01:55 +10:00
Ross
d4dee04c7f feat(windows): remove hotkey from pop-up. content-frame size
The hotkey option and editing did not need to be on the add remove
languages pop-up.
There size of the contentframe for all the tabs was incorrectly
calculated. The header size was not correct as the header had
padding. This caused the size to be redrawn incorrectly when
a scroll bar was first added.
2022-10-19 15:22:03 +10:00
Ross
f3fdccf602 feat(windows): add modify dialog save state jSON 2022-10-17 15:13:16 +10:00
rc-swag
65696d85f1
fix(windows): review comments for code comment
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2022-10-14 18:33:12 +10:00
rc-swag
b6722f6a0a
fix(windows): Add review suggestions
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-10-14 16:14:51 +10:00
Ross
90eb7c77ec fix(windows): ensure all modifier events go to seralized queue 2022-10-13 13:24:29 +10:00
Ross
a3645dde43 feat(windows): seperate localisation strings
Use a different string id for a button and header
as in other languages they may translate differently
2022-10-11 21:10:11 +10:00
Ross
1d7e0cedc9 feat(windows): Tweaks to layout
- Red Text in Languages if no languages have been added
- Adjust spacing for the keyboard layout buttons to insure the overall
  flex box padding matches the gap between the buttons.
- Remove blue hover from languages
- Add a selection colour for keyboard layout that has focus
- Change Hover colour for buttons
- Tweaks to the appearance of the Add/remove languages pop-up include a close button.
2022-09-29 21:14:28 +10:00