mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
app,io/router: map Androids' DPAD_CENTER to a click
Mapping it to key.NameReturn confuses widgets such as Editor that treats clicks separate from return key presses. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -510,6 +510,12 @@ func (c *callbacks) MoveFocus(dir router.FocusDirection) {
|
||||
c.w.updateAnimation(c.d)
|
||||
}
|
||||
|
||||
func (c *callbacks) ClickFocus() {
|
||||
c.w.queue.q.ClickFocus()
|
||||
c.w.setNextFrame(time.Time{})
|
||||
c.w.updateAnimation(c.d)
|
||||
}
|
||||
|
||||
func (e *editorState) Replace(r key.Range, text string) {
|
||||
if r.Start > r.End {
|
||||
r.Start, r.End = r.End, r.Start
|
||||
|
||||
Reference in New Issue
Block a user