Focus inheritance?
#1
Suppose I have a bunch of controls of various types, some focusable and some not, all adjacent (no gaps). Underneath them all is an invisible button (which is obviously focusable).

If I move the mouse from a button onto an adjacent non-focusable thing (like an image or label) will the button underneath get the focus? Or will nothing?

I'm seeing inconsistent behaviour. Sometimes it works and sometimes it doesn't (as tested by putting a different image for texturefocus on the underlying button). Also, if the thing moved into is a disabled button, it never seems to pass focus to the underlying button. Should it?
HDHomerun Quatro, RaspPi/TVHeadend, NUC/Win10/Kodi, Mousetuary skin, Mouse on couch!
Reply
#2
That would stop the real buttons from getting the focus, wouldn't it?
HDHomerun Quatro, RaspPi/TVHeadend, NUC/Win10/Kodi, Mousetuary skin, Mouse on couch!
Reply
#3
I guess I am confused with what your trying to do... So you want all the buttons to get focus as u move the mouse? .. if so put the on top of the images? Not sure what u want to achieve.
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply
#4
(2017-05-12, 07:41)aegidius Wrote: Also, if the thing moved into is a disabled button, it never seems to pass focus to the underlying button. Should it?

No, it's still a button - just hide it if it's disabled.
Reply
#5
(2017-05-12, 11:58)smitchell6879 Wrote: I guess I am confused with what your trying to do... So you want all the buttons to get focus as u move the mouse? .. if so put the on top of the images? Not sure what u want to achieve.

It's the side menu in Estuary. The way it's written, the visibility of the group is driven by one of its controls having the focus. As soon as you move the mouse onto a non-focusable object like a label, the menu goes away, so it's useless with the mouse.

I'm trying to keep it visible as long as the mouse is anywhere within the area of the menu. So I changed the underlying black background to a button, so that could take the focus when I moved the mouse between controls. It seems to work fine on the addon browser, file browser etc. but still doesn't work on the PVR side menus.

Really, a simple mouse-is-in-rectangle condition would do just fine for visibility, then I wouldn't have to worry about focus at all. Is there such a thing?
HDHomerun Quatro, RaspPi/TVHeadend, NUC/Win10/Kodi, Mousetuary skin, Mouse on couch!
Reply
#6
Take a look at Aeon Nox 5' side menu. I use a window property so it doesn't lose focus when you hover the mouse elsewhere.
Reply
#7
Thanks, that nailed it!
I committed a change to do that, and to dismiss the side menu with a back button in the top left corner. If I've missed any screens or the thing sticks around when it shouldn't, someone (or I) will find it eventually :-). .
HDHomerun Quatro, RaspPi/TVHeadend, NUC/Win10/Kodi, Mousetuary skin, Mouse on couch!
Reply

Logout Mark Read Team Forum Stats Members Help
Focus inheritance?0