app: replace driver.Close with Perform(ActionClose)

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-06-23 14:31:44 +02:00
parent 43116400d0
commit 371de3462b
9 changed files with 26 additions and 45 deletions
+2 -4
View File
@@ -753,10 +753,6 @@ func (w *window) HWND() (syscall.Handle, int, int) {
return w.hwnd, w.config.Size.X, w.config.Size.Y
}
func (w *window) Close() {
windows.PostMessage(w.hwnd, windows.WM_CLOSE, 0, 0)
}
func (w *window) Perform(acts system.Action) {
walkActions(acts, func(a system.Action) {
switch a {
@@ -774,6 +770,8 @@ func (w *window) Perform(acts system.Action) {
windows.SetWindowPos(w.hwnd, 0, x, y, dx, dy, windows.SWP_NOOWNERZORDER|windows.SWP_FRAMECHANGED)
case system.ActionRaise:
w.raise()
case system.ActionClose:
windows.PostMessage(w.hwnd, windows.WM_CLOSE, 0, 0)
}
})
}