mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app: [Windows] don't add or remove the WS_MAXIMIZE flag
ShowWindow(SW_SHOWMAXIMIZED/SW_SHOWNORMAL) is what changes the window size and state. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
@@ -594,7 +594,7 @@ func (w *window) Configure(options []Option) {
|
||||
|
||||
case Maximized:
|
||||
// Set window style.
|
||||
style := windows.GetWindowLong(w.hwnd, windows.GWL_STYLE) & (^uintptr(windows.WS_MAXIMIZE))
|
||||
style := windows.GetWindowLong(w.hwnd, windows.GWL_STYLE)
|
||||
windows.SetWindowLong(w.hwnd, windows.GWL_STYLE, style|windows.WS_OVERLAPPEDWINDOW)
|
||||
mi := windows.GetMonitorInfo(w.hwnd).Monitor
|
||||
w.config.Size = image.Point{X: int(mi.Right - mi.Left), Y: int(mi.Bottom - mi.Top)}
|
||||
@@ -603,7 +603,7 @@ func (w *window) Configure(options []Option) {
|
||||
case Windowed:
|
||||
windows.SetWindowText(w.hwnd, w.config.Title)
|
||||
// Set window style.
|
||||
style := windows.GetWindowLong(w.hwnd, windows.GWL_STYLE) & (^uintptr(windows.WS_MAXIMIZE))
|
||||
style := windows.GetWindowLong(w.hwnd, windows.GWL_STYLE)
|
||||
windows.SetWindowLong(w.hwnd, windows.GWL_STYLE, style|windows.WS_OVERLAPPEDWINDOW)
|
||||
// Get target for client areaa size.
|
||||
width := int32(w.config.Size.X)
|
||||
|
||||
Reference in New Issue
Block a user