mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +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
37bae461d1
commit
4e4533c89d
@ -1347,6 +1347,7 @@ func (u *userInterfaceImpl) setWindowSizeInDIPImpl(width, height int, fullscreen
|
|||||||
u.swapBuffers()
|
u.swapBuffers()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: origWindowPos should always return invalidPos, then this logic should not be needed.
|
||||||
if x, y := u.origWindowPos(); x != invalidPos && y != invalidPos {
|
if x, y := u.origWindowPos(); x != invalidPos && y != invalidPos {
|
||||||
u.window.SetPos(x, y)
|
u.window.SetPos(x, y)
|
||||||
// Dirty hack for macOS (#703). Rendering doesn't work correctly with one SetPos, but
|
// Dirty hack for macOS (#703). Rendering doesn't work correctly with one SetPos, but
|
||||||
|
@ -103,10 +103,6 @@ package ui
|
|||||||
// - (void)windowDidExitFullScreen:(NSNotification *)notification {
|
// - (void)windowDidExitFullScreen:(NSNotification *)notification {
|
||||||
// NSWindow* window = (NSWindow*)[notification object];
|
// NSWindow* window = (NSWindow*)[notification object];
|
||||||
// [self popResizableState:window];
|
// [self popResizableState:window];
|
||||||
// CGRect frame;
|
|
||||||
// frame.origin = self->_origPos;
|
|
||||||
// frame.size = self->_origSize;
|
|
||||||
// [window setFrame:frame display:YES];
|
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// @end
|
// @end
|
||||||
|
Loading…
Reference in New Issue
Block a user