Application:toggle-main-window on Windows 10

Bug report

On Windows 10 the application:toggle-main-window command behaves different from Linux. On Linux I can spam my global shortcut that I set for it and it will show-unshow-show-unshow etc. On Windows the command only hides the window, which on Windows 10 does not seem to unfocus it. Therefore, when I spam the shortcut on Windows it simply unshows and then stops doing anything until I give focus to another application.

This can be fixed by calling blur() on the BrowserWindow before hide()'ing it. Considering the command is a “core” feature I don’t think it’s a good idea to fix this through a plugin.

Info

  • Platform: Windows
  • Platform version: 10
  • App Version: 4.5.2

Reproduce

On Windows 10, add the following to the keymap file:

'global':
  'ctrl-alt-E': 'application:toggle-main-window'

Then reload Inkdrop and spam Ctrl+Alt+E. It will only hide once and stop doing anything until focus is given to another application or to the desktop, after which the shortcut will show the window again.

1 Like

Thank you for the report, Jasper!
I will check it on Windows 10.

Sorry for the delay.
I checked your suggestion works!
Could you try a patch here? https://inkdrop-dist.s3-ap-northeast-1.amazonaws.com/tmp/Inkdrop-4.5.2-Windows-patch-1.zip

1 Like

The patch works, thanks!

1 Like

Cool, thanks for testing it!