move install_signal_handlers to proper location

This commit is contained in:
Travis McLane
2024-03-06 16:59:13 -06:00
parent a7fb568aff
commit 6d90c1678c
2 changed files with 4 additions and 2 deletions
-1
View File
@@ -177,7 +177,6 @@ func (a *linuxApp) monitorThemeChanges() {
func newPlatformApp(parent *App) *linuxApp {
C.install_signal_handlers()
name := strings.ToLower(strings.Replace(parent.options.Name, " ", "", -1))
if name == "" {
name = "undefined"
+4 -1
View File
@@ -4,12 +4,13 @@ package application
import (
"fmt"
"github.com/wailsapp/wails/v3/internal/assetserver/webview"
"regexp"
"strings"
"sync"
"unsafe"
"github.com/wailsapp/wails/v3/internal/assetserver/webview"
"github.com/wailsapp/wails/v3/pkg/events"
)
@@ -317,6 +318,8 @@ func appName() string {
}
func appNew(name string) pointer {
C.install_signal_handlers()
// prevent leading number
if matched, _ := regexp.MatchString(`^\d+`, name); matched {
name = fmt.Sprintf("_%s", name)