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
    972
    673
    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,611
    2,639
    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

    If you’re planning to submit a pull request, let’s go through the list of issues and their solutions. I or someone from the team will create a Jira ticket, and for each ticket, you’ll make the changes and submit a pull request. This will be transparent and straightforward.
    If you’re planning to submit a pull request, let’s go through the list of issues and their solutions. I or someone from the team...
    I'm very glad to see that mediaportal 1 is on github, where ordinary devs with github accounts can make contributions. Please can...
    Replies
    7
    Views
    1K
    TV Server plugins are listed on this page, and "EPG Cleaner" can be downloaded from this page. Note: I don't know what bitness the plugin has. It might be 32-bit, or it might be "any cpu". The plugin is not listed by the "MP Extensions" tool, so I don't know whether it has been tested with the most-recent MP releases. -- from...
    TV Server plugins are listed on this page, and "EPG Cleaner" can be downloaded from this page. Note: I don't know what bitness the...
    I'm looking for a better recording scheduler. Many recording titles (at least in the UK) change between episodes, sometimes being...
    Replies
    4
    Views
    1K
    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
    2K
    MP1 MP2 Spell Check gone? DE
    Got it.:) I clicked on the box highlighted in the attached screenshot and also added English GB to that and removed the existing English EN. Misspellled words (like that one) are now underlined with red wavy line.:)
    Got it.:) I clicked on the box highlighted in the attached screenshot and also added English GB to that and removed the existing...
    Up untill recently I'm sure there was a spell checker on new posts, (misspelled words were highlighted). It does not seem to be...
    Replies
    8
    Views
    2K
    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
    Top Bottom