5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-20 10:59:30 +08:00

[v3 windows] improve main thread calls

This commit is contained in:
Lea Anthony 2023-06-16 21:04:44 +10:00
parent 72ec10b181
commit ae9b158b04
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -43,6 +43,10 @@ type windowsApp struct {
currentWindowID uint currentWindowID uint
} }
func (m *windowsApp) isOnMainThread() bool {
return m.mainThreadID == w32.GetCurrentThreadId()
}
func (m *windowsApp) GetFlags(options Options) map[string]any { func (m *windowsApp) GetFlags(options Options) map[string]any {
if options.Flags == nil { if options.Flags == nil {
options.Flags = make(map[string]any) options.Flags = make(map[string]any)