allowhiddenfocus

Discussion in '1.0 RC4 and SVN Builds' started by pilehave, December 1, 2008.

  1. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    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:
    Cooling:
    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.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. ajp8164

    ajp8164 Portal Pro

    Joined:
    January 9, 2008
    Messages:
    575
    Likes Received:
    583
    Gender:
    Male
    Occupation:
    Consulting Software Engineer
    Location:
    Atlanta, GA
    Ratings:
    +584 / 0
    Home Country:
    United States of America United States of America
    Show System Specs
    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.
     

    Attached Files:

    • Like Like x 1
  4. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    I tested it out briefly, and now the control does excactly what it should, thanks a lot! Hope this is in SVN soon :)
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!