Skip to content

Commit

Permalink
internal/ui: bug fix: an undecorated window should reach the top of t…
Browse files Browse the repository at this point in the history
…he screen

Closes #3118
Closes #3162
  • Loading branch information
hajimehoshi committed Nov 17, 2024
1 parent 1e583e6 commit 53090f3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/ui/ui_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ func (u *UserInterface) adjustWindowPosition(x, y int, monitor *Monitor) (int, i
return x, y
}

// If a window is not decorated, the window should be able to reach the top of the screen (#3118).
d, err := u.window.GetAttrib(glfw.Decorated)
if err != nil {
return 0, 0, err

Check failure on line 121 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.22.x on windows-latest

too many return values

Check failure on line 121 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.22.x on windows-latest

too many return values

Check failure on line 121 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.22.x on windows-latest

too many return values

Check failure on line 121 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.22.x on windows-latest

too many return values

Check failure on line 121 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.23.x on windows-latest

too many return values

Check failure on line 121 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.23.x on windows-latest

too many return values

Check failure on line 121 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.23.x on windows-latest

too many return values

Check failure on line 121 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.23.x on windows-latest

too many return values

Check failure on line 121 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Vulnerability Check with Go 1.22.9 on windows-latest

too many return values
}
if d == glfw.False {
return x, y, nil

Check failure on line 124 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.22.x on windows-latest

too many return values

Check failure on line 124 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.22.x on windows-latest

too many return values

Check failure on line 124 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.22.x on windows-latest

too many return values

Check failure on line 124 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.22.x on windows-latest

too many return values

Check failure on line 124 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.23.x on windows-latest

too many return values

Check failure on line 124 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.23.x on windows-latest

too many return values

Check failure on line 124 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.23.x on windows-latest

too many return values

Check failure on line 124 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.23.x on windows-latest

too many return values

Check failure on line 124 in internal/ui/ui_windows.go

View workflow job for this annotation

GitHub Actions / Vulnerability Check with Go 1.22.9 on windows-latest

too many return values
}

mx := monitor.boundsInGLFWPixels.Min.X
my := monitor.boundsInGLFWPixels.Min.Y
// As the video width/height might be wrong,
Expand Down

0 comments on commit 53090f3

Please sign in to comment.