MPtray and focus issue (1 Viewer)

damaster

Portal Pro
November 23, 2007
412
35
Home Country
Canada Canada
I have an issue where MediaPortal loses keyboard focus when I start playing some 720p/1080p videos. Even my remote numeric buttons stop working and I have to press ALT+TAB to get focus back to MediaPortal after which the keyboard and MCE remote's numeric buttons work fine.

I've narrowed this down to Mptray because when I kill the Mptray process I absolutely can not get the issue to reproduce.

Anyone else having the same issue with Mptray?
 

Paranoid Delusion

Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    I have an issue where MediaPortal loses keyboard focus when I start playing some 720p/1080p videos

    Have you got Divx\CoreAVC\FFDShow system tray icons activated, this is usually down to one or the other, just deactivate in the codec settings.
     

    damaster

    Portal Pro
    November 23, 2007
    412
    35
    Home Country
    Canada Canada
    Probably AC3Filter... but the problem goes away when I kill Mptray. You still think it's the tray icon of AC3Filter?
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Well there looks like nothing else that could take focus away, I'm the same as you with Vista, must say even if I do lose focus, then pressing the green button brings it back, and I am talking about MPTay, not MPTrayMod, which causes splashscreen load problems on MP's first start.
     

    damaster

    Portal Pro
    November 23, 2007
    412
    35
    Home Country
    Canada Canada
    I'm using MPTrayMod, and I've been debugging the source code today and found a couple of bugs right off the bat.

    First off, in mptray.cs, the code tries to re-launch the mediaportal.exe process even though it is currently running after it switches focus to it. That in itself is strange. There's a return statement missing here:
    Code:
      Process[] processes = Process.GetProcessesByName("mediaportal");
      if(processes.Length != 0)
      {
        SwitchFocus();
      }
    
      try
      {
        // Launch mediaportal.exe ...
      }

    I'm not at home right now, but I'm going to test my modified version of MPTrayMod tonight and see if it solves the focus issues.
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Well if you do please share, we have been talking for ages about incorporating MPTray into MP core distribution, so any improvements within the code would be appreciated.
     

    damaster

    Portal Pro
    November 23, 2007
    412
    35
    Home Country
    Canada Canada
    Well if you do please share, we have been talking for ages about incorporating MPTray into MP core distribution, so any improvements within the code would be appreciated.

    So I managed to fix the issues with MPTrayMod:
    1) My MediaPortal no longer loses focus no matter how many times I press the "Start"/Green button on my remote and play all kinds of video. Keyboard and remote input continues to work flawlessly. I also always have my MediaPortal configured to "Always on top".
    2) Splash screen now appears as it should when MediaPortal is launched using the "Start"/Green button.

    Attached are the binary and modified source files (I updated the solution and project files to Visual Studio 2008).
     

    Attachments

    • mptray-mod-patched.rar
      30.7 KB

    esas

    Portal Pro
    November 14, 2006
    160
    27
    Home Country
    Norway Norway
    I used to have problems loosing the numeric keys on my remote (all the other buttons still worked). After installing your mod this problem seems to be gone. But I still have the splash screen issue when launching MP with "green button".
     

    Cybertex

    Portal Pro
    August 9, 2007
    200
    14
    Milano
    Home Country
    Italy Italy
    Well if you do please share, we have been talking for ages about incorporating MPTray into MP core distribution, so any improvements within the code would be appreciated.

    So I managed to fix the issues with MPTrayMod:
    1) My MediaPortal no longer loses focus no matter how many times I press the "Start"/Green button on my remote and play all kinds of video. Keyboard and remote input continues to work flawlessly. I also always have my MediaPortal configured to "Always on top".
    2) Splash screen now appears as it should when MediaPortal is launched using the "Start"/Green button.

    Attached are the binary and modified source files (I updated the solution and project files to Visual Studio 2008).

    Hi damaster, good to hear you narrowed down the problem. But, have you tried MPTray (not the MOD version)? I experienced same problems as yours using MPTrayMod, while MPTray always works well.
     

    damaster

    Portal Pro
    November 23, 2007
    412
    35
    Home Country
    Canada Canada
    I used to have problems loosing the numeric keys on my remote (all the other buttons still worked). After installing your mod this problem seems to be gone. But I still have the splash screen issue when launching MP with "green button".

    Hmm, I don't have the splash screen problem with my mod, but perhaps that has something to do with the fact that I have set my MP to be "Always on top".
     

    Users who are viewing this thread

    Top Bottom