Shift Aero button slightly when it is positioned in corner of any
monitor (not just primary one).
Moreover this shift should be done only for top/bottom taskbar.
Original fix introduced in 528d15 was not correct.
The problem is that `SystemParametersInfo` uses DPI that current session
started with.
We should use `SystemParametersInfoForDpi` (available since Win10 1607)
that returns properly scaled font size.
Fixes#1110
If skin doesn't specify font to be used (such as `Classic Skin`) we will
use default system font (used for menus).
But we didn't scale the font size according to DPI.
This commit will fix that.
Fixes#1110
Windows 11 Insider builds started to register global shell hotkey for
Win key (and Ctrl+Esc) that are used to trigger start menu.
The problem is that it is not (easily) possible to intercept messages
about these hotkeys.
Thus we will unregister them during init and install hook that will
prevent their further registration.
Fixes#1165
Windows updates are applied on shutdown/reboot no matter of flags used
in ExitWindowsEx (or InitiateShutdown).
Windows start menu shutdown code handles updates in special way.
If there are updates prepared and shutdown/reboot is selected it will
use `UpdateSessionOrchestrator` object to dismiss updates and carry out
the command.
We will now do similar thing.
Fixes#1250
Shutdown privilege can be removed from users (in Local Security Policy settings).
This will remove it also from limited admin.
Thus admin will be unable to shutdown machine (because Explorer runs as
limited admin by default).
In such case we will attempt to do silent elevation and proceed with
shutdown using `SystemSettingsAdminFlows.exe` helper.
Fixes#1015
Windows start menu uses it that way too.
ExitWindowsEx is also annotated as legacy API in SDK.
We will also put shutdown handling into separate function, so that we
have it handled at one place (will make further changes easier).
Standard API for sleep (`SetSuspendState`) seems to do nothing on
systems with connected standby.
Windows start menu calls `NtPowerInformation(ScreenOff)` on such systems instead.
This is implemented in `shutdownux!ShutdownViewModel::_InitiatePowerTransition` function.
Fixes#719
With the option enabled keyboard accelerators will be triggered only if Alt key
is pressed as well.
This is how typical Windows keyboard accelerators work, to avoid
confusion with regular key presses.
Fixes#117