Skip to content

Commit

Permalink
fixed: open cec-tray minimised if configured. don't open and minimise…
Browse files Browse the repository at this point in the history
…. issue #158
  • Loading branch information
opdenkamp committed Dec 2, 2015
1 parent 5bd9990 commit 58d012e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/LibCecTray/ui/CECTray.cs
Expand Up @@ -39,7 +39,6 @@
using LibCECTray.controller.applications;
using LibCECTray.settings;
using Microsoft.Win32;
using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Threading;
using System.Text;
Expand Down Expand Up @@ -73,6 +72,16 @@ public CECTray()
SystemEvents.SessionEnding += new SessionEndingEventHandler(OnSessionEnding);
}

protected override void SetVisibleCore(bool value)
{
if (Controller.Settings.StartHidden.Value)
{
value = false;
if (!this.IsHandleCreated) CreateHandle();
}
base.SetVisibleCore(value);
}

public void OnSessionEnding(object sender, SessionEndingEventArgs e)
{
Controller.CECActions.SuppressUpdates = true;
Expand Down

0 comments on commit 58d012e

Please sign in to comment.