app: add Window.Raise to bring a window to the front

Fixes gio#252

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
Pierre Curto
2021-09-08 22:02:26 +02:00
committed by Elias Naur
parent c5d4e01e3d
commit 2f66ed1dc8
10 changed files with 61 additions and 0 deletions
+10
View File
@@ -604,6 +604,16 @@ func (w *Window) updateCursor() {
}
}
// Raise requests that the platform bring this window to the top of all open windows.
// Some platforms do not allow this except under certain circumstances, such as when
// a window from the same application already has focus. If the platform does not
// support it, this method will do nothing.
func (w *Window) Raise() {
w.driverDefer(func(d driver) {
d.Raise()
})
}
func (q *queue) Events(k event.Tag) []event.Event {
return q.q.Events(k)
}