mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
uis/app: (macos) relay system focus events
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -130,6 +130,12 @@ func gio_onDraw(view C.CFTypeRef) {
|
||||
w.draw(true)
|
||||
}
|
||||
|
||||
//export gio_onFocus
|
||||
func gio_onFocus(view C.CFTypeRef, focus C.BOOL) {
|
||||
w := views[view]
|
||||
w.w.event(key.Focus{Focus: focus == C.YES})
|
||||
}
|
||||
|
||||
func (w *window) draw(sync bool) {
|
||||
width, height := int(C.gio_viewWidth(w.view)+.5), int(C.gio_viewHeight(w.view)+.5)
|
||||
if width == 0 || height == 0 {
|
||||
|
||||
Reference in New Issue
Block a user