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:
Hajime Hoshi 2022-09-02 17:47:07 +09:00
parent 7c6466cfa0
commit 40052f6e35
2 changed files with 1 additions and 4 deletions

View File

@ -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

View File

@ -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