allowhiddenfocus (1 Viewer)


Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    Denmark Denmark
    • Thread starter
    • Moderator
    • #1
    TV-Server Version: RC4
    MediaPortal Version: RC4
    MediaPortal Skin: Monochrome 16:9
    Windows Version: XP Pro SP3
    CPU Type: AMD x2 4850e 2.5 GHz 45w
    HDD: Samsung Spinpoint 250GB 2.5"
    Memory: 4 GB DDR2 800 MHz Dual-Channel
    Motherboard: Gigabyte GA-MA78GM-S2H (rev 1.0)
    Video Card: Onboard AMD Radeon HD 3200
    Video Card Driver: Catalyst 8.8 official
    Sound Card: Onboard ALC889A
    Sound Card AC3:
    Sound Card Driver:
    1. TV Card: Terratec Cinergy 2400i DT
    1. TV Card Type: DVB-T
    1. TV Card Driver:
    2. TV Card:
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec:
    MPEG2 Audio Codec:
    h.264 Video Codec:
    Satelite/CableTV Provider:
    HTPC Case:
    Power Supply: picuPSU 120W
    Remote: Logitech 885
    TV: LG 42PM1MA
    TV - HTPC Connection: HDMI

    The statement below, taken from the Wiki is not working, and has not been for long.

    Could someone please fix it before releasing MP 1.0?

    One thing you will notice, is that when a control is hidden, it can't be focused. This means you can't move to a control and have it automatically become visible (eg even if it had Control.HasFocus(myID) it wouldn't come back on, as MP wouldn't allow navigation to the hidden control). To solve this issue, you can use:

    <visible allowhiddenfocus="true">Control.HasFocus(21)</visible>

    on a control of <id> 21. This will allow the control to be focusable even when it's hidden. When the user moves to the hidden control, it will automatically unhide itself, due to the Control.HasFocus(21) visibility condition.


    Portal Pro
    January 9, 2008
    Atlanta, GA
    United States of America United States of America
    allowhiddenfocus patch

    I also found that allowhiddenfocus as described in the documentation was not functioning as advertised. In looking at the implementation I found that it was simply not complete; there where two items to address:

    (1) the skin xml node attribute (allowhiddenfocus="true") was never read from the skin xml file and stored in the control object

    (2) the logic for testing whether or not the control should grab focus (even when not visible, and then forcing visibility) was flawed.

    I managed to correct each of these items and tested with some skin development I am working on. I tested with button controls and it appears to work great. I also browsed around the Blue3 skin to smoke test the change. Nothing appears broken... so far.

    I would appreciate anyone who interested to apply the patch, rebuild, and test.

    The patch affects GUIControl.cs and GUIControlFactory.cs in the Core.dll.



    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    Denmark Denmark
    • Thread starter
    • Moderator
    • #3
    I tested it out briefly, and now the control does excactly what it should, thanks a lot! Hope this is in SVN soon :)

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom