Green Button do not restore MP1 anymore (1 Viewer)

brain1000

Portal Member
November 25, 2012
18
7
Home Country
Great Britain (UK) Great Britain (UK)
Previously when MP was minimised the Green Button would open up the MP window - it no longer does this on the HID input handler.
 
Last edited by a moderator:

joEhSuper

MP Donator
  • Premium Supporter
  • June 2, 2011
    968
    665
    Home Country
    Austria Austria
    In addition, previously when MP was minimised the Green Button would open up the MP window - it no longer does this on the HID input handler.
    This I can not confirm - I have a Harmony Remote 700/650 - setup as MCE Remote and here the Menu = Green Button does start MP... (but don't ask me why and how :ROFLMAO:)
     

    brain1000

    Portal Member
    November 25, 2012
    18
    7
    Home Country
    Great Britain (UK) Great Britain (UK)
    Thanks for the reply.

    On my system, the Green Button (on a MS remote) starts up MP fine if it MP not running, it just will not work if MP is minimised :-(
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    3,359
    2,280
    Southampton
    Home Country
    United Kingdom United Kingdom
    In addition, previously when MP was minimised the Green Button would open up the MP window - it no longer does this on the HID input handler.
    I am running MP 1.12, which has both the "Generic HID" tab and the "Microsoft MCE" tab, so I have been able to try both. I can confirm that:

    (1) When using "Microsoft MCE" with MP minimised to the "Task Bar", the START button restores the MP window to its previous size. :)

    (2) When using "Generic HID" with MP minimised to the "Task Bar", the START button does nothing. :(

    Has this been fixed in MP 1.13? (I cannot test this at the moment.)

    -- from CyberSimian in the UK
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    I checked the code and nothing has changed there so I'm not sure what could be going on.
    Do know however that while starting MP will always work reliably restoring MP can fail.
    That's the case now and that was the case before.
    In fact on Windows an application can not manipulate other applications and send them in the foreground and background reliably without getting some special permission and signing which MP tray does not have. Often what you get is the flashing task bar entry when Windows prevented and application to manipulate foreground status.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,523
    10,466
    France
    Home Country
    France France
    I remember seeing code about MCE for green button to make it focus and restore, but i didn't remember where. I'm not sure it was on mptray, what i remember is that it was sort of key signal.
    Will try to find a commit about it lol.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,523
    10,466
    France
    Home Country
    France France
    Before the code was :
    C#:
    private static void OnClick(object sender, RemoteEventArgs e)
    {
    Process[] processes = Process.GetProcessesByName("mediaportal");
    
          if (processes.Length != 0)
          {
            if (processes.Length > 1)
            {
              Log.Write("MPTray: More than one window named \"MediaPortal\" has been found!");
              foreach (Process procName in processes)
              {
                Log.Write("MPTray: {0} (Started: {1}, ID: {2})", procName.ProcessName,
                          procName.StartTime.ToShortTimeString(), procName.Id);
              }
            }
            Log.Write("MPTray: MediaPortal is already running - switching focus.");
            SwitchFocus();
    .....
    }

    We have the SwitchFocus(); call :) so i think here when green button was pressed -> switchfocus.
    The switch code didn't change but now we have the -> private void DoStart()

    Maybe :
    public void HandleHidEvent(object aSender, SharpLib.Hid.Event aHidEvent) need to be reworked ?

    This was not here before, so if i understand if MP is in tray, it will be focused.
    C#:
    if (aHidEvent.IsStray)
          {
            //Stray event just ignore it
            return;
          }
     

    Users who are viewing this thread

    Similar threads

    It is present, but not with that name. It is called Scheduler, viz: Interesting. I had never noticed that when the "command" is "ACTION", the "cmdproperty" is the actual window id, but it makes sense that it is. Try this for yourself. First backup your working profile for the remote, then in the "Mapping" panel make a change to...
    It is present, but not with that name. It is called Scheduler, viz: Interesting. I had never noticed that when the "command" is...
    I would like to be able to go directly to the Scheduled recordings window without having to first go to the home menu. I saw this...
    Replies
    1
    Views
    1K
    Thank you Cybersymian, that solution works perfectly. Thanks for the prompt reply and solution.
    Thank you Cybersymian, that solution works perfectly. Thanks for the prompt reply and solution.
    I recently upgraded to Mediaportal 1.33 x64 version. Everything works great, except when I drop out to Windows and want to go back...
    Replies
    2
    Views
    2K
    Hello, Name need to be the same as computer name. Also, logs could be useful.
    Hello, Name need to be the same as computer name. Also, logs could be useful.
    It is a bit of a long story! I successfully installed MP2 on my old PC as client/server with client on my laptop to confirm my...
    Replies
    2
    Views
    873
    MP1 MP2 Picture-in-picture DE
    Can anyone tell me the step-by-step procedure for bringing up a second channel in pip mode? I can only do it sometimes, after many tries, and it’s not clear what I am doing that makes it work on those occasions when it does. Cannot find guidance on the site. Thanks, N. Again, if anyone knows how to do this, would be much...
    Can anyone tell me the step-by-step procedure for bringing up a second channel in pip mode? I can only do it sometimes, after many...
    Can anyone tell me the step-by-step procedure for bringing up a second channel in pip mode? I can only do it sometimes, after many...
    Replies
    0
    Views
    1K
    I have recently installed MediaPortal 1.37 (x64) and MP-TVSeries v4.5.1.697 and unfortunately the TV episode runtime duration is missing in my Titan skin. This only applies to my .TS files, my .MKV files are OK. I believe the difference is likely to be because .MKV files embed the runtime in the file unlike .TS files. I have done...
    I have recently installed MediaPortal 1.37 (x64) and MP-TVSeries v4.5.1.697 and unfortunately the TV episode runtime duration is...
    I have recently installed MediaPortal 1.37 (x64) and MP-TVSeries v4.5.1.697 and unfortunately the TV episode runtime duration is...
    Replies
    0
    Views
    671
    Top Bottom