question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`hideOnStart` is not working

See original GitHub issue

I confirm (by marking “x” in the [ ] below: [x]):


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.0 also master.
  • Mattermost Server version: 6.5.0.

Steps to reproduce

  1. Start desktop client;
  2. open settings;
  3. check hide on start;
  4. terminate client;
  5. open client once more.

For master branch

  1. npm ci;
  2. npm run watch;
  3. open settings;
  4. check hide on start;
  5. 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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
devinbinniecommented, May 17, 2022
0reactions
devinbinniecommented, May 27, 2022

It is, but you need to have libappindicator running 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found