editor focus?

I thought I had better dig around a bit and see if I just have missed something with an example of code somewhere that calls the focus method. It used to work, and even, when an editor was focused on an old configuration widget, when it was scrolled, the focus jumped to the first next editor to be rendered.

But I haven't seen this function work at all since at least october last year in any of my code. I figured I could defer dealing with the problem until later.

I'm mainly posting this issue in order to canvas the devs watching this issue tracker whether they can confirm they have observed the same issue, or, more happily, that they can point me at a repository that has this function in use and it is working.

Assigned to
a month ago
a month ago
No labels applied.

~inkeliz a month ago

The Focus behaviour was changed (gio#180). In February/2021, the key.FocusOp was changed again, but just a little bit.

In general, Gio will no longer focus on the first InputOp, and it will not open the virtual keyboard by default. You can set the Focus to any Tag, using the key.FocusOp{} (or remove the Focus). If you want to open the on-screen keyboard, you must also use key.SoftKeyboardOp.

~stalker_loki a month ago

So, in other words, I need to write functions that mimic the behaviour under the 'gain focus' condition in editor.go, right? Adding those events to the gtx.ops queue?

Then it looks like those booleans and the functions are all outdated, and indeed nobody else was using them. I see the sense of it though it's very minimalistic implementation, there really should be an entire keyboard focus set which would by default follow the tree of widgets as its path.

~whereswaldon a month ago

Yes, see here for the discussion of how we hope to build that tree: https://todo.sr.ht/~eliasnaur/gio/195

~stalker_loki a month ago

Thanks for pointing me in the right direction, I have been thinking how to implement a lot recently. I will move to there and mark this resolved.

~stalker_loki REPORTED FIXED a month ago

Register here or Log in to comment, or comment via email.