From 1d51dc5f59bb5749a3f2c3967461731c2c0832ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E7=BA=A2=E5=B2=A9?= Date: Wed, 18 Jan 2023 18:25:53 +0800 Subject: [PATCH] v2.3.29 Fixed Chinese input and gtk3 issues for linux packagin, And Windows Drag Region --- cef/cef-browser-window-lcl_windows.go | 8 ++++---- example/dev-test/lcl-browser/lcl-browser.go | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) 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