Fixes for PowerToys Awake (#12215)

* Change how background threads operate
This should reduce CPU usage.

* Well there is just no need for the console here

* Need to keep the full name sanitized

* Update the changes to console handling

* Updating how we handle constants

* Fix process termination logic

* Making some tweaks to the termination logic

* Update how the process is tracked

* Updating how application closing is done for Awake.

* Update with explicit types

* Fix high CPU usage for timed keep awake.

* Logging typo fix.

* Update some of the timer logic.

* Fix variable naming for consistency

* Cleanup the C++ interface

* Cleanup the code a bit
This change introduces support for:

- Proper event handling across the two apps (Awake and runner).
- Removal of unnecessary functions.

* Cleaning up the code even further

* Remove unnecessary functions
This commit is contained in:
Den Delimarsky
2021-07-13 10:39:46 -07:00
committed by GitHub
parent 5027a55e7f
commit 579881002e
8 changed files with 216 additions and 139 deletions

View File

@@ -58,7 +58,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
OnPropertyChanged(nameof(IsEnabled));
OnPropertyChanged(nameof(IsTimeConfigurationEnabled));
var outgoing = new OutGoingGeneralSettings(GeneralSettingsConfig);
OutGoingGeneralSettings outgoing = new OutGoingGeneralSettings(GeneralSettingsConfig);
SendConfigMSG(outgoing.ToString());
NotifyPropertyChanged();
}
@@ -143,7 +143,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
SndAwakeSettings outsettings = new SndAwakeSettings(Settings);
SndModuleSettings<SndAwakeSettings> ipcMessage = new SndModuleSettings<SndAwakeSettings>(outsettings);
var targetMessage = ipcMessage.ToJsonString();
string targetMessage = ipcMessage.ToJsonString();
SendConfigMSG(targetMessage);
}
}