diff --git a/cef/cef-browser-window-lcl_windows.go b/cef/cef-browser-window-lcl_windows.go index 7e4fc196..0d51c35a 100644 --- a/cef/cef-browser-window-lcl_windows.go +++ b/cef/cef-browser-window-lcl_windows.go @@ -79,11 +79,11 @@ func (m *LCLBrowserWindow) doOnRenderCompMsg(message *types.TMessage, lResult *t win.ReleaseCapture() m.windowsState = m.WindowState() if m.windowsState == types.WsNormal { - rtl.SendMessage(m.Handle(), WM_SYSCOMMAND, SC_MAXIMIZE, 0) + rtl.PostMessage(m.Handle(), WM_SYSCOMMAND, SC_MAXIMIZE, 0) } else { - rtl.SendMessage(m.Handle(), WM_SYSCOMMAND, SC_RESTORE, 0) + rtl.PostMessage(m.Handle(), WM_SYSCOMMAND, SC_RESTORE, 0) } - rtl.SendMessage(m.Handle(), WM_NCLBUTTONUP, 0, 0) + rtl.SendMessage(m.Handle(), WM_NCLBUTTONUP, HTCAPTION, 0) } case WM_NCLBUTTONDOWN: //nc l down if m.rgn != nil && wdrs.canCaption { @@ -91,7 +91,7 @@ func (m *LCLBrowserWindow) doOnRenderCompMsg(message *types.TMessage, lResult *t *aHandled = true win.ReleaseCapture() rtl.PostMessage(m.Handle(), WM_NCLBUTTONDOWN, HTCAPTION, 0) - rtl.SendMessage(m.Handle(), WM_NCLBUTTONUP, 0, 0) + rtl.SendMessage(m.Handle(), WM_NCLBUTTONUP, HTCAPTION, 0) } case WM_NCLBUTTONUP: //nc l up if m.rgn != nil && wdrs.canCaption { diff --git a/example/dev-test/lcl-browser/lcl-browser.go b/example/dev-test/lcl-browser/lcl-browser.go index a0166291..bc5bff19 100644 --- a/example/dev-test/lcl-browser/lcl-browser.go +++ b/example/dev-test/lcl-browser/lcl-browser.go @@ -29,7 +29,8 @@ func main() { browserWindow := window.AsLCLBrowserWindow().BrowserWindow() browserWindow.Constraints().SetMinWidth(300) browserWindow.Constraints().SetMinHeight(300) - //window.HideTitle() + window.HideTitle() + //window.DisableResize() window.AsLCLBrowserWindow().BrowserWindow().SetOnCloseQuery(func(sender lcl.IObject, canClose *bool) bool { fmt.Println("lcl browser close query") return false