SetFocus problem
#1
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?
Image
Reply
#2
It's intended - you can only have focus on one thing at a time.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
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.
Image
Reply
#4
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
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
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.
Image
Reply
#6
Ok - that's definitely not the desired behaviour. Mind popping up a trac ticket and cc'ing me?

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
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...
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#8
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.
Reply
#9
jmarshall Wrote:Ok - that's definitely not the desired behaviour. Mind popping up a trac ticket and cc'ing me?

Cheers,
Jonathan

Done Smile
Image
Reply

Logout Mark Read Team Forum Stats Members Help
SetFocus problem0