Commit Graph

334 Commits

Author SHA1 Message Date
ge0rdi
4705b35694 Fix Aero button alignment on multiple monitors (#1310)
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.
2023-02-03 08:55:26 +01:00
ge0rdi
073035bee9 Override SearchFiles description in ADML
So that it will not depend on whether Windows Search service is running or not.

Fixes #1318
2023-01-31 14:05:18 +01:00
ge0rdi
ab4771e015 Setup: Don't install Classic IE by default
IE was deprecated long ago. There is no need to install Classic IE by
default.
Users will be still able to install it if they want.
2023-01-30 19:34:23 +01:00
ge0rdi
d0ad10429f Skin: Suppress warning regarding use of wildcards in project files
Skin projects are created just once and then they are not supposed to be
changed (from within VS).
So we can mark them as _read only_ projects.

https://learn.microsoft.com/en-us/cpp/build/reference/vcxproj-files-and-wildcards?view=msvc-170
2023-01-29 16:11:38 +01:00
Eli
7f56207fa1 Update README.md
Various formatting & style improvements
2023-01-25 06:55:05 +01:00
ge0rdi
21eea53dfd Properly scale default skin font according to DPI (#1110)
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
v4.4.189
2023-01-19 08:27:02 +01:00
ge0rdi
2d6fb1f3bb Setup: Recognize also /h and /help parameters (#1278)
Otherwise they will get passed to `msiexec` that will display its help
window that may confuse our users (as they expect our help to be displayed).
v4.4.188
2023-01-13 16:42:16 +01:00
ge0rdi
528d15e6c9 Properly scale default skin font according to DPI (#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
2023-01-13 16:42:16 +01:00
ge0rdi
615fe66544 Start menu keyboard hotkey fix for Win11 Insider (#1165)
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
2023-01-13 16:42:16 +01:00
bonzibudd
01c1227895 New issue templates
Updated to use YAML format, along with some minor changes and additions.

 - Update format and description for further clarity
2023-01-09 07:03:05 +01:00
Eli Farmer
ecd17cb628 New default Immersive skin for Win10/11 (#538)
Fixes #538
v4.4.187
2023-01-06 18:05:01 +01:00
ge0rdi
134b414f0b Use proper modern settings icon (#495)
Fixes #495
2023-01-06 18:05:01 +01:00
ge0rdi
421f55192e Properly scale modern task icons (#518)
Fixes #518
2023-01-06 18:05:01 +01:00
ge0rdi
cf763d3a32 Optimize main icon for size
Bigger icons are stored as PNG.
2023-01-06 18:05:01 +01:00
ge0rdi
4a417cc02c Skin: Common skin project props 2023-01-06 18:05:01 +01:00
Mr-Update
c6924a8b92 Update StartMenuL10N.ini (German) 2023-01-02 20:42:26 +01:00
ge0rdi
344aa60893 Select Apps icon based on Windows version
We now have nicer Apps icons for Win10/11 so we will select proper icon
based on Windows version.
v4.4.186
2022-12-30 18:14:22 +01:00
Eli Farmer
7f492f3a9f Modern looking icons for Apps folder on Win10/11. 2022-12-30 18:14:22 +01:00
ge0rdi
1c95f17460 Fixed typo [skip ci] 2022-12-29 10:24:53 +01:00
ge0rdi
674a486c7f Make sure tray buttons are properly positioned when custom start button was created
Fixes #1232
v4.4.185
2022-12-28 19:26:22 +01:00
ge0rdi
412accc066 Help: Fix StartMenu registry path 2022-12-28 19:26:22 +01:00
ge0rdi
ba24c72347 Simplify "advanced_boot" command handling
`SHUTDOWN_RESTART_BOOTOPTIONS` should be supported at least since Win8.1
2022-12-28 19:26:22 +01:00
ge0rdi
11dd302689 Properly handle Windows updates during shutdown
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
2022-12-28 19:26:22 +01:00
ge0rdi
58bc654304 Allow shutdown even if limited admin doesn't have shutdown privilege
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
2022-12-28 19:26:22 +01:00
ge0rdi
c5410326fe Use InitiateShutdown instead of ExitWindowsEx for shutdown/restart
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).
2022-12-28 19:26:22 +01:00
ge0rdi
db0e768f81 Proper sleep operation on systems with connected standby enabled
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
2022-12-28 19:26:22 +01:00
ge0rdi
23a1dc7e07 Added new option "Require Alt key for accelerators"
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
2022-12-28 19:26:22 +01:00
ge0rdi
a7b6a80799 Added new option "Enable accelerators"
It will control whether keyboard accelerators are used in start menu.

Disabling it can be helpful for people that tend to hit some accelerator by mistake.

Fixes #447
2022-12-28 19:26:22 +01:00
ge0rdi
fad20ba4c7 Activate start menu window only after search focus was set
Start menu window was activated early in the process of its creation.
This means it was receiving input before focus was set to search bar.
And that may have lead to unwanted use of keyboard accelerators.

We need to make sure that window is activated (receives input) only once
focus was set to search box.

Fixes #1068
2022-12-28 19:26:22 +01:00
ge0rdi
2a7fc0034c ModernSettings: Remove duplicates
Windows started to add newer version of settings to settings description
file. These have the same description as older settings, but use
different parameters.

Unfortunately old settings are still present.
This causes our modern settings folder to contain duplicates.
And also we tend to use older setting definitions that no longer work
properly.

Thus we will de-duplicate parsed settings and try to keep newer ones
(that should work better).
New settings tend to have numeric suffix, so we will keep those with
biggest suffix.

Fixes #1031
2022-12-28 19:26:22 +01:00
ge0rdi
658981adf7 ModernSettings: Improve indirect string loading
Defender settings on Win11 use indirect strings in form:
`@{Microsoft.SecHealthUI_8wekyb3d8bbwe?ms-resource://Microsoft.SecHealthUI/Resources/DisplayName}`

`SHLoadIndirectString` is unable to load such indirect string, because it expects full
package name (instead of package family name).

In such case we will convert package family name to full name and try again.
2022-12-28 19:26:22 +01:00
ge0rdi
b6f5402220 Fix taskbar texture on Windows 11
- Taskbar is now handled by taskbar.dll, so we need to hook APIs there
  - TaskList window (MSTaskListWClass) is not visible so we need to
    hook messages of its parent TaskBand window (MSTaskSwWClass)

Fixes #1230
2022-12-28 19:26:22 +01:00
ge0rdi
de0d6cff40 Show start menu next to taskbar by default
This changes default value of `Show next to taskbar (when the taskbar is vertical)` setting to `enabled`.

It makes more sense to have menu next to vertical taskbar than to
overlap it (and hide taskbar buttons).

Windows start menu does it like that too.
2022-12-28 19:26:22 +01:00
ge0rdi
881787bed6 Proper start menu alignment in case of vertical taskbar Windows 11
Fixes #1231
2022-12-28 19:26:22 +01:00
ge0rdi
e25b656275 Use VS2022
Note that `_ATL_MODULES` define is now needed for compatibility with C++
conformance mode (`/permissive-`).
More details here:
https://developercommunity.visualstudio.com/t/Crash-in-ATL-CEnumerator::MoveNext-after/10116823
2022-12-28 19:26:22 +01:00
Eli Farmer
a784b6fdb4 Remove unnecessary Localization folder
Folder is not used anywhere in build, instead Src/Localization is used.
v4.4.184
2022-12-24 17:35:59 +01:00
Eli Farmer
bfb8ef31fe Rename Menu.html to StartMenu.html
This should fix the initial error message upon launching the help dialog.
Fixes #524

fix

 - Rename Menu.html in other languages
2022-12-24 17:35:59 +01:00
Eli Farmer
4e4da93b6c Updates to Help
- New help style
 - Grammar fixes/slight reformatting
 - Windows 8 -> 8+
 - Links now go to Github or Classic shell mirror
 - Updated Readme and EULA style to match
 Fixes #1173, #880
2022-12-24 17:35:59 +01:00
ge0rdi
b0c1d9a229 Fix for potential crash introduced in 1b013c3
Fixes #1245
v4.4.183
2022-12-14 16:10:10 +01:00
Eli Farmer
ac80080f90 Update README.md
- General grammar/format/convention improvements
 - Switch to shields.io for gitter badge and change color of Discord badge
2022-12-08 15:23:34 +01:00
bonzibudd
d28c8e512a New icons and installer artwork
This adds the new artwork for the main icon and installer screens.
Addresses #31.

Update classic button thumbnail

Improve setup banner icon

Fix web.ico size

New installer art

Fix dialog2
v4.4.182
2022-12-07 11:58:37 +01:00
bonzibudd
be57a43589 Format ReadMe icon 2022-12-07 11:58:37 +01:00
ge0rdi
0465ac9c1b Use Segoe Fluent Icons font for modern settings icons on Win11
It seems that Windows 11 prefers `Segoe Fluent Icons` over `Segoe MDL2 Assets` font.
https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font

Most of settings defined in `AllSystemSettings_{253E530E-387D-4BC2-959D-E6F86122E5F2}.xml` now refer to the new font.
v4.4.181
2022-12-06 19:17:18 +01:00
ge0rdi
77d2d3a01d Don't show Windows Shell Experience Host in list of frequent programs
It is not a program that user will use explicitly.
No need to show it in the list even if Windows tracks it as frequent
program for some reason.

Fixes #1164
2022-12-06 19:17:18 +01:00
ge0rdi
704459225b Properly handle automatically hiding taskbar on multi-monitor setup
When taskbar is hidden its window is moved off the screen (except for
few pixels at border). It may happen that the taskbar window actually
spans to another monitor (though still not visible).

MonitorFromWindow API may thus return different monitor handle than the
one visible taskbar is on.

We will use GetTaskbarPosition function that correctly identifies taskbar's
monitor by checking rectangle of visible taskbar.

Fixes #908
2022-12-06 19:17:18 +01:00
ge0rdi
04770c403d Windows 11 start menu button support
- handling of `Taskbar alignment` setting (left/center)
  - start menu position is based on position of start button
  - mouse clicks to original button now work properly (without triggering original menu)
  - custom button is properly positioned
  - Win+X works properly
2022-12-06 19:17:18 +01:00
ge0rdi
f42980e090 Make debugging more skin friendly
Debug StartMenuDLL used to not find skins when put to Open-Shell
installation folder.

Now it will try to look for skins in default location (Skins folder in
the same folder as DLL) and use alternative (Skins folder one level up)
if not present.
2022-12-06 19:17:18 +01:00
ge0rdi
7ad33f509e Fix skin options default values
Multi-string settings have to be terminated by new line.
Otherwise there may be some garbage (following the string)
stored in registry.
2022-12-06 19:17:18 +01:00
ge0rdi
1b013c3590 Don't track usage of Open-Shell modern settings folder
This way `Open-Shell Modern Settings` folder won't appear in File
Explorer's frequent list.

Fixes #744.
2022-12-06 19:17:18 +01:00
ge0rdi
cef27bdfa0 Use more convenient format for color settings
We are storing color settings in BBGGRR format (for historical reasons).
This may be confusing for people that are used to (more widely used) RRGGBB format.

Thus we will present color settings in RRGGBB format when editing.

We will still use BBGGRR format for those settings internally. To
maintain backward compatibility with existing settings stored in
registry/xml.

Also setting descriptions now contain hint about expected color format.
This way it should be more clear what values `Open-Shell` expects.

Fixes #82, #1141.
2022-12-06 19:17:18 +01:00