Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
move SystemEvents_DisplaySettingsChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Higgins committed Nov 24, 2020
1 parent 148602d commit 2129f7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CenterTaskbar/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public TrayApplication(IReadOnlyList<string> args)
};

Start();
SystemEvents.DisplaySettingsChanging += SystemEvents_DisplaySettingsChanged;
}

[DllImport("user32.dll", SetLastError = true)]
Expand Down Expand Up @@ -270,8 +271,6 @@ private void Start()
_uiaEventHandler = OnUIAutomationEvent;
Automation.AddAutomationEventHandler(WindowPattern.WindowOpenedEvent, Desktop, TreeScope.Subtree, _uiaEventHandler);
Automation.AddAutomationEventHandler(WindowPattern.WindowClosedEvent, Desktop, TreeScope.Subtree, _uiaEventHandler);

SystemEvents.DisplaySettingsChanging += SystemEvents_DisplaySettingsChanged;
}

private void SystemEvents_DisplaySettingsChanged(object sender, EventArgs e)
Expand Down

0 comments on commit 2129f7b

Please sign in to comment.