Skip to content

Commit

Permalink
set Maximized flag based on Maximized, not Fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Nov 26, 2024
1 parent 2127172 commit b9d78ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions system/driver/desktop/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ func (w *Window) Moved(gw *glfw.Window, x, y int) {
w.Mu.Unlock()
// w.app.GetScreens() // this can crash here on win disconnect..
w.Screen() // gets parameters
w.UpdateFullscreen()
w.updateMaximized()
w.Event.Window(events.WinMove)
}

Expand All @@ -390,12 +390,12 @@ func (w *Window) WinResized(gw *glfw.Window, width, height int) {
if MonitorDebug {
log.Printf("desktop.Window.WinResized: %v: %v (was: %v)\n", w.Nm, image.Pt(width, height), w.PixSize)
}
w.UpdateFullscreen()
w.updateMaximized()
w.UpdateGeom()
}

func (w *Window) UpdateFullscreen() {
w.Flgs.SetFlag(w.Glw.GetAttrib(glfw.Maximized) == glfw.True, system.Fullscreen)
func (w *Window) updateMaximized() {
w.Flgs.SetFlag(w.Glw.GetAttrib(glfw.Maximized) == glfw.True, system.Maximized)
}

func (w *Window) UpdateGeom() {
Expand Down

0 comments on commit b9d78ee

Please sign in to comment.