[windows] fix frameless resize

This commit is contained in:
Lea Anthony
2024-02-01 06:47:49 +11:00
parent 5670c1e655
commit 6e2bbe31ac
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -633,6 +633,7 @@ func (w *WebviewWindow) HandleMessage(message string) {
case message == "wails:runtime:ready":
w.emit(events.Common.WindowRuntimeReady)
w.runtimeLoaded = true
w.SetResizable(!w.options.DisableResize)
for _, js := range w.pendingJS {
w.ExecJS("", js)
}
+1 -1
View File
@@ -139,7 +139,7 @@ func (w *windowsWebviewWindow) setURL(url string) {
func (w *windowsWebviewWindow) setResizable(resizable bool) {
w.setStyle(resizable, w32.WS_THICKFRAME)
w.execJS(fmt.Sprintf("window._wails.drag.resizable(%v);", resizable))
w.execJS(fmt.Sprintf("window._wails.setResizable(%v);", resizable))
}
func (w *windowsWebviewWindow) setMinSize(width, height int) {