Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mattermost app is in Windows tab list after hidden auto-start #738

Closed
3 tasks done
nmatt opened this issue Mar 22, 2018 · 8 comments
Closed
3 tasks done

Mattermost app is in Windows tab list after hidden auto-start #738

nmatt opened this issue Mar 22, 2018 · 8 comments

Comments

@nmatt
Copy link

nmatt commented Mar 22, 2018

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


https://mattermost.atlassian.net/browse/MM-14071

Summary

When auto-starting Mattermost Desktop on Windows login, the application windows is (correctly) hidden, but it (incorrectly) is still shown in the task bar and shows up in the Alt+Tab list.

Steps to reproduce

On Windows, activate "Start app on login" in the settings. Log off and log in again. Mattermost starts hidden with a tray icon. Observe that no Mattermost application window is shown, but it is active on the task bar, and pressing Alt+Tab shows it in the tab list. (This is reminiscent of issue #233.) After opening the application and closing the window again (the application remains in the tray), it correctly disappears from the task bar and from the Alt+Tab list.

I'm using --disable-gpu to workaround issue #713, but the above problem happens regardless.

This issue applies to Mattermost Desktop version 4.0.0.

Expected behavior

After auto-start, the application should not appear on the task bar and should not show up in the Alt+Tab list.

Observed behavior

After auto-start, the application appears on the task bar and shows up in the Alt+Tab list.

Possible fixes

@yuya-oc
Copy link
Contributor

yuya-oc commented Apr 2, 2018

Sorry for late response. It's intended behavior. The window starts as a minimized window, so it should appear on the task bar and Alt+Tab list.

So we need to decide what is appropriate behavior for startup.

Just for reference. In past issues, your observed behavior is treated as correct.

@nmatt
Copy link
Author

nmatt commented Apr 2, 2018

Thanks for your response.

For Windows applications that have a tray icon or that can minimize to a tray icon, the usual behavior when auto-starting is that they minimize to the tray, i.e. they don't appear in the Alt+Tab list or on the task bar. I currently have about a dozen tray-icon applications running which all work that way. Therefore I would say that this is the more expected behavior for such applications on Windows.

As the Mattermost Desktop application window has both the option of minimizing to the task bar (via "Minimize") and minimizing to the tray (via "Close"), it would make sense to have both options for startup as well (and maybe also the option to auto-start non-minimized; but see below).

When auto-starting an application by (manually) placing a shortcut in the Startup folder, one can configure in the shortcut properties whether the application should start in a normal window or minimized or maximized. This used to work in earlier versions of Mattermost Desktop, but now the application always opens in a normal window regardless of what the shortcut specifies. My point here is that auto-starting in minimized state can normally be achieved using built-in Windows features and doesn't require special application support. Starting/minimizing into the tray, on the other hand, does require application support, and therefore that would be the most important feature to have support for in the application. That is, if Mattermost Desktop would comply with what the shortcut specifies, and only add an option to minimize to the tray instead of to the task bar, then this would be sufficient to enable all use cases and personal preferences.

@jasonblais
Copy link
Contributor

@yuya-oc Thoughts on the above note?

@yuya-oc
Copy link
Contributor

yuya-oc commented Apr 13, 2018

When auto-starting an application by (manually) placing a shortcut in the Startup folder, one can configure in the shortcut properties whether the application should start in a normal window or minimized or maximized.

@nmatt Just curious, do you know the way to get the configuration in program code? Due to a reason of appearance, for now we need to manually control the window state on startup. (possibly it might be blocking Windows' behavior though)

What about having sub options, minimize(default) and minimize to tray for "Start app on login"?

@nmatt
Copy link
Author

nmatt commented Apr 13, 2018

@yuya-oc: I believe the configured option is passed to WinMain as the value of the nCmdShow parameter. The application then should pass that value to the first invocation of ShowWindow. The value is presumably also set in the STARTUPINFO structure, which can be obtained via the GetStartupInfo.

Having those two options would be good. I would suggest to name the first one "minimize to task bar" just for clarity. It would also be useful to be able to override the startup options using command-line parameters.

@yuya-oc
Copy link
Contributor

yuya-oc commented Apr 16, 2018

Thanks! GetStartupInfo would be an appropriate choice for typical native apps, but it's not easy for Electron because it needs help of its native part or Node's native addon.

So we would be able to follow only new options and command line options.

@amyblais
Copy link
Member

amyblais commented Feb 8, 2019

Jira ticket for tracking: https://mattermost.atlassian.net/browse/MM-14071.

@amyblais amyblais changed the title Mattermost app is in Windows tab list after hidden auto-start [Help Wanted] Mattermost app is in Windows tab list after hidden auto-start Feb 27, 2019
@amyblais amyblais removed the Hackfest null label Mar 1, 2019
@amyblais amyblais added the Hacktoberfest null label Oct 7, 2019
@hanzei hanzei changed the title [Help Wanted] Mattermost app is in Windows tab list after hidden auto-start Mattermost app is in Windows tab list after hidden auto-start Oct 22, 2019
@amyblais amyblais removed the Hacktoberfest null label Nov 4, 2019
@jespino jespino added the Hacktoberfest null label Sep 21, 2020
@jespino jespino removed the Hacktoberfest null label Jan 14, 2021
@cpanato cpanato added the Hacktoberfest null label Oct 2, 2021
@devinbinnie
Copy link
Member

Closing as per JIRA ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants