5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 10:51:35 +08:00

Bugfix/2848 window set position timing (#2850)

* run WindowSetPosition on main thread

* remove wait group from SetPosition it is not neaded

* update changelog
This commit is contained in:
Zámbó, Levente 2023-08-24 20:50:26 +01:00 committed by GitHub
parent 8700d225c1
commit 9085e1edbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -173,7 +173,9 @@ func (w *Window) Center() {
}
func (w *Window) SetPosition(x int, y int) {
C.SetPosition(unsafe.Pointer(w.asGTKWindow()), C.int(x), C.int(y))
invokeOnMainThread(func() {
C.SetPosition(unsafe.Pointer(w.asGTKWindow()), C.int(x), C.int(y))
})
}
func (w *Window) Size() (int, int) {

View File

@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Avoid app crashing when the Linux GTK key is empty. Fixed by @aminya in [PR](https://github.com/wailsapp/wails/pull/2672)
- Fixed a race condition when positioning the window on Linux. Added by @lyimmi in [PR](https://github.com/wailsapp/wails/pull/2850)
### Added