Skip to content

Commit

Permalink
[windows] fix frameless resize
Browse files Browse the repository at this point in the history
  • Loading branch information
leaanthony committed Jan 31, 2024
1 parent 5670c1e commit 6e2bbe3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions v3/pkg/application/webview_window.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion v3/pkg/application/webview_window_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6e2bbe3

Please sign in to comment.