Improve Windows stash behaviour (#2543)

* Rename manager.instance to Manager
* Show dialog message on fatal error on Windows
* Hide console windows explicitly on icon launch

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.

* Remove fixconsole
* Add changelog entries
This commit is contained in:
WithoutPants
2022-05-04 10:37:32 +10:00
committed by GitHub
parent 36aa51a187
commit a6f15273d9
55 changed files with 262 additions and 9187 deletions

View File

@@ -1,6 +1,7 @@
package desktop
import (
"fmt"
"io/ioutil"
"os"
"path"
@@ -29,6 +30,8 @@ type FaviconProvider interface {
// MUST be run on the main goroutine or will have no effect on macOS
func Start(shutdownHandler ShutdownHandler, faviconProvider FaviconProvider) {
if IsDesktop() {
hideConsole()
c := config.GetInstance()
if !c.GetNoBrowser() {
openURLInBrowser("")
@@ -60,6 +63,11 @@ func SendNotification(title string, text string) {
}
func IsDesktop() bool {
if isDoubleClickLaunched() {
fmt.Println("double click launched")
return true
}
// Check if running under root
if os.Getuid() == 0 {
return false