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

Improve Windows stash behaviour #2543

Merged
merged 8 commits into from May 4, 2022

Conversation

WithoutPants
Copy link
Collaborator

Addresses some issues with the Windows version of stash:

  • removes the windowsgui flag from the build. This was causing interoperability issues when running from the console, and as far as I can tell was only used to prevent the console window from appearing.
  • changes the IsDesktop function to return true if the executable was launched from Windows, rather than invoked from a console. It does this via isDoubleClickLaunched.
  • if IsDesktop returns true, then hides the console window that appears when launching via hideConsole.
  • if IsDesktop is true, and an error occurs on startup, or a panic occurs, a dialog window will be displayed with the error message, instead of crashing silently.

Also makes manager.instance public and renames to manager.Manager.

Gets rid of the windowsgui flag, which causes all sorts of issues.
Instead, checks if stash was launched from the icon, and if so hides the console.
@WithoutPants WithoutPants added the improvement Something needed tweaking. label May 2, 2022
@WithoutPants WithoutPants added this to the Version 0.15.0 milestone May 2, 2022
Copy link
Collaborator

@kermieisinthehouse kermieisinthehouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed but not tested.

Looks good to me, generally. Have you tested getting rid of fixconsole? I think if you got rid of the windowsgui flag, you probably don't need it to fix the shell when running from a console. Otherwise looks good, and having some error handling is nice

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

Successfully merging this pull request may close these issues.

None yet

2 participants