[Evaluate] - Keep MediaPortal Always On Top Option [second display]

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by AlexRozen, January 10, 2010.

  1. AlexRozen
    • Premium Supporter

    AlexRozen MP Donator

    Joined:
    August 27, 2009
    Messages:
    16
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Russian Federation Russian Federation
    MediaPortal Version: 1.1.0 BETA-1 rev23491 + svn-12-24-2009 Rev24553
    Windows Version: Windows 7 x64
    CPU Type: Intel Core 2 Duo
    Memory: 4Gb
    Motherboard: ASUS P5BE Plus
    Video Card: ATI Radeon HD4870 1GB
    Video Card Driver: ATUI Catalys 9.12
    Remote: MCE Remote
    TV: Sony Bravia 32"
    TV - HTPC Connection: HDMI 15m
    Additional Software:IR Server Suite - Test Build 1.4.2.3281



    Hello! I am using MP in dual-screen configuration. My goal is to have MP on the secondary display and all apps on the main desktop to work independently.

    So, my MP is configured to start in fullscreen mode on the second display (extended desktop), "Keep MediaPortal Always On Top" option is disabled, IRSS is configured not to require Media Portal to be focused.

    All works independently, just I want it to be like.

    But when the button "Minimize all windows" is pressed, MediaPortal on the second display is minimized too. Also the occasionally dragged from the main desktop window may overlap the MediaPortal output.

    So, I have tried to use the option "Keep MediaPortal Always On Top", but it seems to be useless for me -- MediaPortal window becomes not topmost, but it becomes to be autofocused and reactivated few times per second. So, I can't use keyboard-driven apps on my primary desktop during the MP is running in such configuration :(

    How can this behaviour be fixed? I want that option to make MP be topmost non-minimisable app, but I don't need it to be always active app.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. AlexRozen
    • Premium Supporter

    AlexRozen MP Donator

    Joined:
    August 27, 2009
    Messages:
    16
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Russian Federation Russian Federation
    Ok. Let's fix it.

    I have digged inside the sources and found out the piece of code that gained such behavior.

    It's a pity, but the issue can't be fixed via any configuration and plugin changes. Only code fix.
    I have built my own version of MediaPortal.exe with such fix. Now MediaPortal works seamlessly on the second display in full-screen and in always-on-top mode without possible minimizing, overlapping and without focus capturing.
    And just the little bonus -- it now provides the normal-speed GUI-animations in Topmost Unfocused mode.

    But I suppose, that it may be better to create the new configuration check in the General section for such behavior.

    P.S. my "debug" patch is attached. It is based on the #24701 revision. May be somebody can propagate that fix into the proper place?
     

    Attached Files:

    • Like Like x 1
  4. Spragleknas
    • Team MediaPortal
    • Administrator

    Spragleknas Administrator

    Joined:
    December 21, 2005
    Messages:
    9,472
    Likes Received:
    1,385
    Gender:
    Male
    Occupation:
    Occupied
    Location:
    Located
    Ratings:
    +1,892 / 12
    Home Country:
    Norway Norway
    Show System Specs
  5. Mr Hipp
    • Premium Supporter

    Mr Hipp Retired Team Member

    Joined:
    April 2, 2006
    Messages:
    1,261
    Likes Received:
    187
    Location:
    Malmö
    Ratings:
    +187 / 0
    Home Country:
    Sweden Sweden
    This is really a good example of a bad patch. We do not want to have code in MP like this:
    Code (Text):
    1.  
    2.  
    3.        // in minitv mode allow to loose focus
    4.        if ((ActiveForm != this) && (alwaysOnTop) && !miniTvMode)
    5.        {
    6.          //Activate();
    7.        }

    If this is ever to be considered, please clean-up the patch.
     
  6. AlexRozen
    • Premium Supporter

    AlexRozen MP Donator

    Joined:
    August 27, 2009
    Messages:
    16
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Russian Federation Russian Federation
    I am sure that it is true. It was the debug code, illustrating the idea, originally posted not in the contributor's place.
    You can see in my second post, that I suppose the need of new config option for this behavior.
    I am the novice with MP sources, so I am not sure, that I can provide the correct patch for such a complex change.

    But it seems, that I should try.
     
  7. AlexRozen
    • Premium Supporter

    AlexRozen MP Donator

    Joined:
    August 27, 2009
    Messages:
    16
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Russian Federation Russian Federation
    Ok. Let's make the second try :)
     

    Attached Files:

  8. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    As this does not apply cleanly anymore, I tried to clean the conflicts. Patch attached, would be nice if original author could verify :)
     

    Attached Files:

  9. tontsa
    • Premium Supporter

    tontsa Retired Team Member

    Joined:
    April 7, 2007
    Messages:
    108
    Likes Received:
    17
    Ratings:
    +17 / 0
    Home Country:
    Finland Finland
    I'm happy with this patch. Video keeps playing in full screen even if you do Win+M in other screen. So +1 from me.
     
  10. jameson_uk
    • Premium Supporter

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,405 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Original poster has not been active on forums for a few months so will send a PM but in the meantime...

    I do not have a second screen to test but could do with a little more info...

    Does the patch simply have an option to keep MP on top but not focused? What happens if MP is running on the first screen does this change behaviour there at all.

    I don't want to add more config options if we can avoid it so need to understand exactly what this patch is for.

    Anyone?
     
  11. AlexRozen
    • Premium Supporter

    AlexRozen MP Donator

    Joined:
    August 27, 2009
    Messages:
    16
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Russian Federation Russian Federation
    I am sorry for my sleep time. :)

    To tell the truth, I am not using MP right now because of my hardware changes, but I will check it as soon as possible.

    Merry christmas everybody!


    Yes, this patch addes the option that does not force MP to be permanently refocused when the "keep on top" option is selected.

    Also this patch keeps the smooth animation when MP window is not focused, but the "keep on top" option is selected.
    Otherwise the unfocused window has a very ugly animation.

    Sorry for my pour English.
     
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!