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
+8 -5
View File
@@ -369,7 +369,14 @@ func (w *window) setTitle(prev, cnf Config) {
}
}
func (w *window) Perform(system.Action) {}
func (w *window) Perform(acts system.Action) {
walkActions(acts, func(a system.Action) {
switch a {
case system.ActionRaise:
C.raiseWindow(w.window)
}
})
}
func (w *window) SetCursor(cursor pointer.Cursor) {
w.cursor = windowSetCursor(w.cursor, cursor)
@@ -397,10 +404,6 @@ func (w *window) SetAnimating(anim bool) {
}
}
func (w *window) Raise() {
C.raiseWindow(w.window)
}
func (w *window) runOnMain(f func()) {
runOnMain(func() {
// Make sure the view is still valid. The window might've been closed