[Evaluate] Keep MediaPortal Always On Top Option [second display] (1 Viewer)

AlexRozen

MP Donator
  • Premium Supporter
  • August 27, 2009
    16
    1
    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.
     

    AlexRozen

    MP Donator
  • Premium Supporter
  • August 27, 2009
    16
    1
    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?
     

    Attachments

    • MediaPortal_AlwaysOnTop_patch.patch
      30.7 KB

    Mr Hipp

    Retired Team Member
  • Premium Supporter
  • April 2, 2006
    1,261
    188
    56
    Malmö
    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:
           // in minitv mode allow to loose focus
           if ((ActiveForm != this) && (alwaysOnTop) && !miniTvMode)
           {
             //Activate();
           }


    If this is ever to be considered, please clean-up the patch.
     

    AlexRozen

    MP Donator
  • Premium Supporter
  • August 27, 2009
    16
    1
    Home Country
    Russian Federation Russian Federation
    This is really a good example of a bad patch. We do not want to have code in MP like this:
    Code:
           // in minitv mode allow to loose focus
           if ((ActiveForm != this) && (alwaysOnTop) && !miniTvMode)
           {
             //Activate();
           }

    If this is ever to be considered, please clean-up the patch.

    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.
     

    AlexRozen

    MP Donator
  • Premium Supporter
  • August 27, 2009
    16
    1
    Home Country
    Russian Federation Russian Federation
    Ok. Let's make the second try :)
     

    Attachments

    • MediaPortal_AlwaysOnTop_patch2.patch
      30.7 KB

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    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 :)
     

    Attachments

    • MediaPortal_AlwaysOnTop_patch3.patch
      10.6 KB

    tontsa

    Retired Team Member
  • Premium Supporter
  • April 7, 2007
    108
    17
    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.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    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?
     

    AlexRozen

    MP Donator
  • Premium Supporter
  • August 27, 2009
    16
    1
    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!

    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?


    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.
     

    Users who are viewing this thread

    Top Bottom