wails/v3/pkg/application/messageprocessor_application.go
copilot-swe-agent[bot] 569def0d62 Fix Windows bugs from discussion #5001: HiddenOnTaskbar focus loss and layered window hit-test region
Co-authored-by: leaanthony <1943904+leaanthony@users.noreply.github.com>
2026-02-22 05:27:05 +00:00

35 lines
693 B
Go

package application
import (
"github.com/wailsapp/wails/v3/pkg/errs"
)
const (
ApplicationHide = 0
ApplicationShow = 1
ApplicationQuit = 2
)
var applicationMethodNames = map[int]string{
ApplicationQuit: "Quit",
ApplicationHide: "Hide",
ApplicationShow: "Show",
}
func (m *MessageProcessor) processApplicationMethod(
req *RuntimeRequest,
) (any, error) {
switch req.Method {
case ApplicationQuit:
globalApplication.Quit()
return unit, nil
case ApplicationHide:
globalApplication.Hide()
return unit, nil
case ApplicationShow:
globalApplication.Show()
return unit, nil
default:
return nil, errs.NewInvalidApplicationCallErrorf("unknown method %d", req.Method)
}
}