mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-27 04:08:53 +01:00
internal/ui: bug fix: wait for a while after exiting fullscreen on macOS
Closes #2758
This commit is contained in:
parent
90accfba1e
commit
b710ff17c8
@ -367,6 +367,14 @@ func (u *userInterfaceImpl) setWindowMonitor(monitor int) {
|
|||||||
// This is copied from setFullscreen. They should probably use a shared function.
|
// This is copied from setFullscreen. They should probably use a shared function.
|
||||||
if fullscreen {
|
if fullscreen {
|
||||||
u.setFullscreen(false)
|
u.setFullscreen(false)
|
||||||
|
// Just after exiting fullscreen, the window state seems very unstable (#2758).
|
||||||
|
// Wait for a while with polling events.
|
||||||
|
if runtime.GOOS == "darwin" {
|
||||||
|
for i := 0; i < 60; i++ {
|
||||||
|
glfw.PollEvents()
|
||||||
|
time.Sleep(time.Second / 60)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
x, y := m.GetPos()
|
x, y := m.GetPos()
|
||||||
|
Loading…
Reference in New Issue
Block a user