Posts: 2,441
Joined: Apr 2009
Reputation:
73
`Black
Team-Kodi Member
Posts: 2,441
Hi,
If I use setFocus in a dialog window, the underlying window seems to lose it's focus too... is this intended or a bug?
Posts: 26,215
Joined: Oct 2003
Reputation:
187
It's intended - you can only have focus on one thing at a time.
Posts: 2,441
Joined: Apr 2009
Reputation:
73
`Black
Team-Kodi Member
Posts: 2,441
If I open a dialog I have focus let's say on control 400 and the underlying window has still focus on control 50 if I close the dialog window. But if I have an extra button to run a script in the dialog window and use setFocus there the underlying window loses focus on control 50 (or whichever control had focus). Worst case is that you can't do anything in that window because the control does not exist and no control has focus. I think setFocus should set the focus only in the current active window where the user can interact so this would not happen.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Are you saying that setFocus is being sent to both the dialog AND the underlying window? You can test this pretty easily by putting a control with the same id in both dialog and window.
I'm assuming, ofcourse, that the dialog has focus (i.e. it's a modal dialog).
Cheers,
Jonathan
Posts: 2,441
Joined: Apr 2009
Reputation:
73
`Black
Team-Kodi Member
Posts: 2,441
Yes that's what I'm saying... I do setFocus(50) in the movie information dialog and when I close the dialog, 50 has also focus in myvideonav so I need an extra click to get focus on the right container again. On home I can't do anything if I open & close the guide menu (player controls) because the control id which get's focus in the guide menu doesn't exist on home.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Ok - that's definitely not the desired behaviour. Mind popping up a trac ticket and cc'ing me?
Cheers,
Jonathan
Posts: 3,379
Joined: Feb 2009
Reputation:
15
mcborzu
Skilled Skinner
Posts: 3,379
I had this problem - would another solution be to give the actor id, which is 50 in movieinformation, a more unique id like 388 or something?
Because I've wanted to create effects where the poster slides out when movieinformation window visible but that effect causes problems cause it's standard practice that everyones basic "files/list" view had id=50...
Check out Night - A Skin For XBMC
Posts: 17,402
Joined: Aug 2007
Reputation:
586
Hitcher
Team-Kodi Member
Posts: 17,402
I had this problem last year and ended up changing the viewtype with id 50 and all it's instances throughout the skin. Not fun.