From 6e2bbe31acaa80f4e02b842b6482e77d66a4b92c Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Thu, 1 Feb 2024 06:47:49 +1100 Subject: [PATCH] [windows] fix frameless resize --- v3/pkg/application/webview_window.go | 1 + v3/pkg/application/webview_window_windows.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/v3/pkg/application/webview_window.go b/v3/pkg/application/webview_window.go index c6f70453734..63f9a4a6836 100644 --- a/v3/pkg/application/webview_window.go +++ b/v3/pkg/application/webview_window.go @@ -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) } diff --git a/v3/pkg/application/webview_window_windows.go b/v3/pkg/application/webview_window_windows.go index 465d628acbd..8e04dd8510f 100644 --- a/v3/pkg/application/webview_window_windows.go +++ b/v3/pkg/application/webview_window_windows.go @@ -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) {