mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[v3 windows] Support Close and take into account HideOnClose option
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ Webview Window Interface Methods
|
||||
| Method | Windows | Linux | Mac | Notes |
|
||||
|----------------------------------------------------|---------|-------|-----|------------------------------------------|
|
||||
| center() | Y | | Y | |
|
||||
| close() | | | Y | |
|
||||
| close() | Y | | Y | |
|
||||
| destroy() | | | Y | |
|
||||
| execJS(js string) | Y | | Y | |
|
||||
| focus() | Y | | Y | |
|
||||
|
||||
@@ -590,6 +590,10 @@ func (w *WebviewWindow) Close() {
|
||||
if w.impl == nil {
|
||||
return
|
||||
}
|
||||
if w.options.HideOnClose {
|
||||
invokeSync(func() { w.Hide() })
|
||||
return
|
||||
}
|
||||
invokeSync(w.impl.close)
|
||||
}
|
||||
|
||||
|
||||
@@ -351,8 +351,7 @@ func (w *windowsWebviewWindow) setZoom(zoom float64) {
|
||||
}
|
||||
|
||||
func (w *windowsWebviewWindow) close() {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
w32.SendMessage(w.hwnd, w32.WM_CLOSE, 0, 0)
|
||||
}
|
||||
|
||||
func (w *windowsWebviewWindow) zoom() {
|
||||
|
||||
Reference in New Issue
Block a user