app: replace driver.Raise with Perform(ActionRaise)

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-04-24 11:36:06 +02:00
parent 6ede60d84e
commit 1a833ab0a4
9 changed files with 53 additions and 49 deletions
+9 -2
View File
@@ -765,9 +765,16 @@ func (w *window) Close() {
windows.PostMessage(w.hwnd, windows.WM_CLOSE, 0, 0)
}
func (w *window) Perform(system.Action) {}
func (w *window) Perform(acts system.Action) {
walkActions(acts, func(a system.Action) {
switch a {
case system.ActionRaise:
w.raise()
}
})
}
func (w *window) Raise() {
func (w *window) raise() {
windows.SetForegroundWindow(w.hwnd)
windows.SetWindowPos(w.hwnd, windows.HWND_TOPMOST, 0, 0, 0, 0,
windows.SWP_NOMOVE|windows.SWP_NOSIZE|windows.SWP_SHOWWINDOW)