Skip to content

Commit

Permalink
[windows] Use POPUP style for fullscreen mode
Browse files Browse the repository at this point in the history
  • Loading branch information
stffabi committed Jan 9, 2023
1 parent 564efb1 commit ecc4519
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion v2/internal/frontend/desktop/windows/winc/form.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,11 @@ func (fm *Form) Fullscreen() {
if !w32.GetWindowPlacement(fm.hwnd, &fm.previousWindowPlacement) {
return
}
w32.SetWindowLong(fm.hwnd, w32.GWL_STYLE, fm.previousWindowStyle & ^uint32(w32.WS_OVERLAPPEDWINDOW))
// According to https://devblogs.microsoft.com/oldnewthing/20050505-04/?p=35703 one should use w32.WS_POPUP | w32.WS_VISIBLE
w32.SetWindowLong(fm.hwnd, w32.GWL_STYLE, fm.previousWindowStyle & ^uint32(w32.WS_OVERLAPPEDWINDOW) | (w32.WS_POPUP|w32.WS_VISIBLE))
fm.isFullscreen = true
// monitorInfo.RcMonitor.Left -= 1
// monitorInfo.RcMonitor.Bottom += 1
w32.SetWindowPos(fm.hwnd, w32.HWND_TOP,
int(monitorInfo.RcMonitor.Left),
int(monitorInfo.RcMonitor.Top),
Expand Down

0 comments on commit ecc4519

Please sign in to comment.