mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/ui: remove an unnecessary hack to resize the window
The bug (#1606) is no longer reproducible even without the hack. Updates #1606 Updates #1609
This commit is contained in:
parent
feb70963c6
commit
f2860bebed
@ -1550,20 +1550,6 @@ func (u *userInterfaceImpl) setWindowPositionInDIP(x, y int, monitor *glfw.Monit
|
||||
} else {
|
||||
u.window.SetPos(x, y)
|
||||
}
|
||||
|
||||
// Call setWindowSize explicitly in order to update the rendering since the callback is disabled now.
|
||||
//
|
||||
// There are cases when setWindowSize should be called (#1606) and should not be called (#1609).
|
||||
// For the former, macOS seems enough so far.
|
||||
//
|
||||
// Do not call setWindowSize in the fullscreen mode since setWindowSize requires the window size
|
||||
// before the fullscreen, while window.GetSize() returns the desktop screen size in the fullscreen mode.
|
||||
if !u.isFullscreen() && runtime.GOOS == "darwin" {
|
||||
w, h := u.window.GetSize()
|
||||
ww := int(u.dipFromGLFWPixel(float64(w), monitor))
|
||||
wh := int(u.dipFromGLFWPixel(float64(h), monitor))
|
||||
u.setWindowSizeInDIP(ww, wh, u.isFullscreen())
|
||||
}
|
||||
}
|
||||
|
||||
// setWindowTitle must be called from the main thread.
|
||||
|
Loading…
Reference in New Issue
Block a user