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:
parent
8700d225c1
commit
9085e1edbb
@ -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) {
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user