U: frameless for windows LCL, Border style reflects,

This commit is contained in:
杨红岩 2024-08-08 16:14:21 +08:00
parent 8a3488d741
commit b67cee543b
2 changed files with 3 additions and 2 deletions

View File

@ -36,9 +36,9 @@ type auxTools struct {
viewSourceWindow IBrowserWindow //viewSource viewSourceWindow IBrowserWindow //viewSource
} }
// 窗口当前状态属性 // 窗口当前状态属性,仅触发全屏使用
type windowCurrentProperty struct { type windowCurrentProperty struct {
windowState types.TWindowState // 仅记录最大化和全屏状态 windowState types.TWindowState
previousWindowPlacement types.TRect previousWindowPlacement types.TRect
} }

View File

@ -44,6 +44,7 @@ func (m *LCLBrowserWindow) wndProc(hwnd types.HWND, message uint32, wParam, lPar
isMaximize := uint32(win.GetWindowLong(m.Handle(), win.GWL_STYLE))&win.WS_MAXIMIZE != 0 isMaximize := uint32(win.GetWindowLong(m.Handle(), win.GWL_STYLE))&win.WS_MAXIMIZE != 0
if isMaximize { if isMaximize {
rect := (*types.Rect)(unsafe.Pointer(lParam)) rect := (*types.Rect)(unsafe.Pointer(lParam))
// m.Monitor().WorkareaRect(): When minimizing windows and restoring windows on multiple monitors, the main monitor is obtained.
// Need to obtain correct monitor information to prevent error freezing message loops from occurring // Need to obtain correct monitor information to prevent error freezing message loops from occurring
monitor := winapi.MonitorFromRect(*rect, winapi.MONITOR_DEFAULTTONULL) monitor := winapi.MonitorFromRect(*rect, winapi.MONITOR_DEFAULTTONULL)
if monitor != 0 { if monitor != 0 {