Skip to content

Commit

Permalink
app: [macOS] fix transition from maximized to restored
Browse files Browse the repository at this point in the history
The NSWindow.zoomed property is not reliable when a window is being
constructed. Only call it when necessary.

Signed-off-by: Elias Naur <[email protected]>
  • Loading branch information
eliasnaur committed Oct 2, 2023
1 parent 526db27 commit b66dcc4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/os_macos.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,11 @@ func (w *window) Configure(options []Option) {
case Minimized:
C.unhideWindow(window)
case Maximized:
if C.isWindowZoomed(window) != 0 {
C.zoomWindow(window)
}
}
w.config.Mode = Windowed
if C.isWindowZoomed(window) != 0 {
C.zoomWindow(window)
}
w.setTitle(prev, cnf)
if prev.Size != cnf.Size {
w.config.Size = cnf.Size
Expand Down

0 comments on commit b66dcc4

Please sign in to comment.