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

Fix --hidden not working on Linux #571

Merged
merged 2 commits into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ Release date: TBD
- Fixed an issue where the text box didn't keep focus after uploading a file.
[#341](https://github.com/mattermost/desktop/issues/341)

#### Linux
- Fixed the main window not minimized when the app is launched via "Start app on Login" option.
[#570](https://github.com/mattermost/desktop/issues/570)
---

## Release v3.7.0
Expand Down
8 changes: 5 additions & 3 deletions src/main/mainWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ function createMainWindow(config, options) {
});

const mainWindow = new BrowserWindow(windowOptions);

const indexURL = global.isDev ? 'http://localhost:8080/browser/index.html' : `file://${app.getAppPath()}/browser/index.html`;
mainWindow.loadURL(indexURL);

// This section should be called after loadURL() #570
if (options.hideOnStartup) {
if (windowOptions.maximized) {
mainWindow.maximize();
Expand All @@ -59,9 +64,6 @@ function createMainWindow(config, options) {
webPreferences.nodeIntegration = false;
});

const indexURL = global.isDev ? 'http://localhost:8080/browser/index.html' : `file://${app.getAppPath()}/browser/index.html`;
mainWindow.loadURL(indexURL);

mainWindow.once('ready-to-show', () => {
if (process.platform !== 'darwin') {
mainWindow.show();
Expand Down