mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/ui: bug fix: do not call setFrame in windowDidExitFullScreen
Calling setFrame in windowDidExitFullScreen caused unexpected results like a strange window size after fullscreen. Let's remove this. By removing this, setting window position and size during fullscreen will no longer work again. Let's fix this later. Closes #2295
This commit is contained in:
parent
7c6466cfa0
commit
40052f6e35
@ -1347,6 +1347,7 @@ func (u *userInterfaceImpl) setWindowSizeInDIPImpl(width, height int, fullscreen
|
||||
u.swapBuffers()
|
||||
}
|
||||
|
||||
// TODO: origWindowPos should always return invalidPos, then this logic should not be needed.
|
||||
if x, y := u.origWindowPos(); x != invalidPos && y != invalidPos {
|
||||
u.window.SetPos(x, y)
|
||||
// Dirty hack for macOS (#703). Rendering doesn't work correctly with one SetPos, but
|
||||
|
@ -103,10 +103,6 @@ package ui
|
||||
// - (void)windowDidExitFullScreen:(NSNotification *)notification {
|
||||
// NSWindow* window = (NSWindow*)[notification object];
|
||||
// [self popResizableState:window];
|
||||
// CGRect frame;
|
||||
// frame.origin = self->_origPos;
|
||||
// frame.size = self->_origSize;
|
||||
// [window setFrame:frame display:YES];
|
||||
// }
|
||||
//
|
||||
// @end
|
||||
|
Loading…
Reference in New Issue
Block a user