`hideOnStart` is not working
See original GitHub issueI confirm (by marking “x” in the [ ] below: [x]):
- This is not a troubleshooting question. Troubleshooting questions go here: https://docs.mattermost.com/install/troubleshooting.html.
- This doesn’t reproduce on web browsers (such as in Chrome). If it does, issue reports go to the Mattermost Server repository.
- I have read contributing guidelines.
Summary Hide on start options was reintroduced in client by #1919. But it doesn’t work as expected, because it does nothing.
Environment
- Operating System:
linux. - Mattermost Desktop App version:
5.1.0alsomaster. - Mattermost Server version:
6.5.0.
Steps to reproduce
- Start desktop client;
- open settings;
- check hide on start;
- terminate client;
- open client once more.
For master branch
npm ci;npm run watch;- open settings;
- check hide on start;
- make client restart.
Expected behavior Client window should not show at all at start.
Observed behavior Client window stays up even if hide on start option is checked.
Possible fixes
- Previously this handled by show and then instant hide. So it can look like.
--- a/src/main/windows/mainWindow.ts +++ b/src/main/windows/mainWindow.ts @@ -121,14 +122,17 @@ if (windowIsMaximized) { mainWindow.maximize(); } + } else { + mainWindow.hide(); } }); - Prevent
show()if window is not yet ready.--- a/src/main/windows/windowManager.ts +++ b/src/main/windows/windowManager.ts @@ -101,6 +102,9 @@ log.debug('WindowManager.showMainWindow', deeplinkingURL); if (this.mainWindow) { + if (!this.mainWindowReady && Config.hideOnStart) { + return; + } if (this.mainWindow.isVisible()) { this.mainWindow.focus(); } else { - Find out why
showMainWindow()was called during startup sequence. Concretely this problem is caused by https://github.com/mattermost/desktop/blob/2e740d60bd55c409e756166ff414696d6449fa8e/src/main/app/config.ts#L36
Additionally
- Useless show https://github.com/mattermost/desktop/blob/2e740d60bd55c409e756166ff414696d6449fa8e/src/main/windows/mainWindow.ts#L127-L129
- Double blur https://github.com/mattermost/desktop/blob/2e740d60bd55c409e756166ff414696d6449fa8e/src/main/windows/mainWindow.ts#L140-L142 https://github.com/mattermost/desktop/blob/2e740d60bd55c409e756166ff414696d6449fa8e/src/main/windows/mainWindow.ts#L231-L233
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
WakeUpDelay doesn't work - Bug - Duplicacy Forum
I installed the new beta and rebooted. Here are my defaults. Moto-Macbook-Air:~ deleted$ defaults read com.acrosync.mac.duplicacy { HideOnStart ...
Read more >[SOLVED] Xmobar not running / Newbie Corner / Arch Linux ...
I am using default .xmobarrc in ~ directory. Running xmobar & spits out. [dezire@Dezire-PC ~]$ xmobar: ...
Read more >Hide window at startup doesn't work - Launchpad Bugs
Just installed Ubuntu 18.04 with Gnome and a clean setup of terminator. None of the hide functions appear to be working (hide on...
Read more >QWidgets not showing after show() -- c++/Qt5 - Stack Overflow
I really not see the reason add widgets to layout via code. Place widgets in UI file, setup it's in code and hide...
Read more >Xmobar disappears on any application launch : r/xmonad
The problem did seem to be with not logging any output. ... lowerOnStart = True , hideOnStart = False , allDesktops = True...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@amyblais Yeah I can, created a ticket: https://mattermost.atlassian.net/browse/MM-44339
It is, but you need to have
libappindicatorrunning on your system, which will give you a ‘Windows-like’ system tray. Some other distributions have a ‘Mac-like’ dock that should also work the same way.