app: [Windows] don't assume fullscreen when not WS_OVERLAPPEDWINDOW

We're about to remove the WS_OVERLAPPEDWINDOW style for undecorated
windows, in which case the fullscreen assumption will no longer hold.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-06-25 10:13:22 +01:00
parent 69e4a3cff3
commit 59480066b4
+4 -2
View File
@@ -200,8 +200,10 @@ func (w *window) update() {
style := windows.GetWindowLong(w.hwnd, windows.GWL_STYLE)
if style&windows.WS_OVERLAPPEDWINDOW == 0 {
mode = Fullscreen
mi := windows.GetMonitorInfo(w.hwnd).Monitor
size = image.Point{X: int(mi.Right - mi.Left), Y: int(mi.Bottom - mi.Top)}
size = image.Point{
X: int(r.Right - r.Left),
Y: int(r.Bottom - r.Top),
}
} else if p.IsMinimized() {
mode = Minimized
} else if p.IsMaximized() {