mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-21 19:39:29 +08:00
Ensure windowDidBecomeKey
callback is running on main thread
This commit is contained in:
parent
e0d788bea9
commit
5445aebe94
@ -17,8 +17,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- [darwin] Ensure `windowDidBecomeKey` callback is running on main thread by [@leaanthony](https://github.com/leaanthony)
|
||||||
|
|
||||||
|
|
||||||
## v3.0.0-alpha.8.3 - 2024-12-07
|
## v3.0.0-alpha.8.3 - 2024-12-07
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Ensure for of taskfile is used by @leaanthony
|
||||||
|
|
||||||
## v3.0.0-alpha.8.2 - 2024-12-07
|
## v3.0.0-alpha.8.2 - 2024-12-07
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -1278,9 +1278,14 @@ func (w *macosWebviewWindow) run() {
|
|||||||
// We have to wait until the window is shown before we can remove the shadow
|
// We have to wait until the window is shown before we can remove the shadow
|
||||||
var cancel func()
|
var cancel func()
|
||||||
cancel = w.parent.OnWindowEvent(events.Mac.WindowDidBecomeKey, func(_ *WindowEvent) {
|
cancel = w.parent.OnWindowEvent(events.Mac.WindowDidBecomeKey, func(_ *WindowEvent) {
|
||||||
w.setHasShadow(!options.Mac.DisableShadow)
|
InvokeAsync(func() {
|
||||||
w.setAlwaysOnTop(options.AlwaysOnTop)
|
if !w.isVisible() {
|
||||||
cancel()
|
w.parent.Show()
|
||||||
|
}
|
||||||
|
w.setHasShadow(!options.Mac.DisableShadow)
|
||||||
|
w.setAlwaysOnTop(options.AlwaysOnTop)
|
||||||
|
cancel()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user