mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
app: introduce Config.Focused that tracks the window focus state
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-1
@@ -612,8 +612,9 @@ func gio_onDraw(h C.uintptr_t) {
|
||||
//export gio_onFocus
|
||||
func gio_onFocus(h C.uintptr_t, focus C.int) {
|
||||
w := windowFor(h)
|
||||
w.ProcessEvent(key.FocusEvent{Focus: focus == 1})
|
||||
w.SetCursor(w.cursor)
|
||||
w.config.Focused = focus == 1
|
||||
w.ProcessEvent(ConfigEvent{Config: w.config})
|
||||
}
|
||||
|
||||
//export gio_onChangeScreen
|
||||
|
||||
Reference in New Issue
Block a user