122 Commits

Author SHA1 Message Date
Anixx
e2758ec376 Support for unthemed taskbar (#2369)
* Support for unthemed taskbar

See this discussion:
https://github.com/Open-Shell/Open-Shell-Menu/discussions/2367

* Refactor color handling in StartMenuDLL
2026-01-24 11:26:25 +01:00
ge0rdi
dd57854da1 Scale custom button image according to current DPI (#2248)
Fixes #2246
2025-12-12 09:09:21 +01:00
Matthijs Lavrijsen
58b909037f Add ARM64 support (#641)
* Add ARM64 build configurations to projects

* StartMenu: add ARM64 support

* Add support for IAT hooking on ARM64

* Add ARM64 support to Classic IE

* Add ARM64 support to installer

NB: WiX 3.14.0.3910 or higher is required to create the MSI

* Revert whitespace change

* Separate x86/x64 and ARM64 installers

* Change suffix of ARM64 binaries

* Put also ARM64 MSI to final installer

* Fix sln

* Build some DLLs as ARM64X

These are meant to be loaded to both x64 and ARM64 processes.
We will compile them as ARM64X (when building for ARM64).
That way they will contain both x64 and ARM64 code paths.

https://learn.microsoft.com/en-us/windows/arm/arm64x-pe

* Make sure x64 installer cannot be installed on ARM64

In case if somebody manually tries to install x64 MSI on ARM64.
This is not supported/working scenario.

---------

Co-authored-by: ge0rdi <ge0rdi@users.noreply.github.com>
2025-05-08 10:14:56 +02:00
ge0rdi
146c27ecd2 Fix tray button positioning 2025-03-13 07:11:37 +01:00
ge0rdi
4943938d0f [ExplorerPatcher] Don't shift custom start button on Win11 2025-03-13 07:11:36 +01:00
ge0rdi
d5c561720d [ExplorerPatcher] Fix taskbar texturing
Fixes #2094.
2025-03-13 07:11:26 +01:00
ge0rdi
f22f10c7d5 Apply taskbar customizations to News and interests
Fixes #676
2025-01-04 16:10:52 +01:00
ge0rdi
faf79de4d5 Fix custom button position on auto-hiding taskbar
Fixes #2067.
2025-01-04 16:10:52 +01:00
ge0rdi
552fbd8296 Set position of tray buttons on primary taskbar only
It seems that secondary taskbars handle try button positioning
correctly. So there is no need for this workaround.

Original change was introduced in 674a486 due to #1232 issue.
2025-01-04 16:10:52 +01:00
ge0rdi
f60e2a18cb Fix custom button auto-hiding (#2041) 2024-12-04 19:54:58 +01:00
ge0rdi
b17d08b7a6 Fix start button/menu misalignment on touch-screen devices
Windows 11 22H2 introduced new touch-optimized taskbar for devices with
touch screen.

It seems that in this mode taskbar window size is bigger than actual
taskbar on screen. There is region defined for the window that covers
actually displayed portion of the window.

We should account for that region (if present) when obtaining taskbar
window dimensions.

More info about how to enable/disable touch taskbar:
https://www.elevenforum.com/t/turn-on-or-off-tablet-optimized-taskbar-in-windows-11.5133/
2024-12-03 10:24:03 +01:00
Lixkote
7e83c56d80 Update Start Menu style previews.
Update the old blurry start menu previews to a more modern pixel-perfect ones that resemble the new default immersive skin.
2024-02-17 12:48:58 +01:00
ge0rdi
8359cfcc81 Fix potential division by zero in DetectGrayscaleImage (#1696) 2023-09-13 10:27:02 +02:00
ge0rdi
aac293832c Avoid recursive Start menu initialization (#1675)
It may happen that during `InitStartMenuDLL` execution some component
posts a message that is then intercepted by (still active) `HookInject`
that will call `InitStartMenuDLL` again (and everything will repeat).

To prevent such endless recursion during initialization, we will make
sure that `InitStartMenuDLL` will be executed just once.
2023-08-24 20:55:13 +02:00
ge0rdi
422b0481bc Rename Align to corner of the screen setting to Align to edge of taskbar
The setting was improperly named and evoked that custom button should be
"moved" to the corner of screen even for center aligned taskbar on Windows 11.

What the setting does (and always did) is to align button to the edge of
taskbar (e.g. bottom edge in case of bottom taskbar) instead of centering it.

Hopefully it will be now more clear.
2023-08-24 11:42:26 +02:00
ge0rdi
c517e21465 Display "Searching..." progress always
Commit be8568c that introduced option to disable "See more results" also
changed behavior of "Searching..." item that indicates search in progress.

We will now make sure that the search progress indicator is displayed
always. No matter of options.
2023-08-16 15:39:47 +02:00
ge0rdi
8f1a696e94 Fix search results overlapping (#1648)
Changes in be8568 commit caused that under certain circumstances search
results may overlap "Search the Internet" item.
2023-08-16 15:39:47 +02:00
ge0rdi
4b26b4d9e6 Allow negative horizontal/vertical menu offsets (#1629)
Menu offsets were previously applied to s_MainMenuLimits.
Though when deciding where to put start menu (CalculateCorner) we are
now taking into account also position of start button (as since Win11 it
may not be in corner of the screen).

This broke negative menu offsets.

We will fix it by applying menu offsets in CalculateCorner as a last
step once we have determined start menu position.
This should make even more sense than previous approach.
2023-08-16 15:39:47 +02:00
ge0rdi
2f251c4f63 Separate taskbar icon for Open-Shell menu settings dialog
It will be now separate from Explorer's icons in taskbar.
Open-Shell icon will be displayed for better clarity.

https://github.com/Open-Shell/Open-Shell-Menu/issues/31#issuecomment-1656611895
2023-08-16 15:39:47 +02:00
ge0rdi
12f1742f71 Show shutdown warning if there are multiple users logged in (#1303) 2023-07-24 18:09:49 +02:00
ge0rdi
9800b03b63 Remove GetDocRelativePath function
Help is always located in the same folder as binary that is using it.
2023-06-10 21:50:46 +02:00
ge0rdi
4377817bef Copy *L10N.ini files to output folder
So that they can be used during debugging.
2023-06-10 21:50:46 +02:00
ge0rdi
8fee436996 Build: Change output paths
All output (and intermediate) files will go to folder outside of source tree.
2023-06-10 21:50:46 +02:00
ge0rdi
714c98130a Simplify project files
Put common build settings into separate props file.
This way it will be much easier to do changes that should affect all
projects in the future.
2023-06-09 17:52:18 +02:00
ge0rdi
fc79fb76c1 Add menu animation fps logging 2023-06-09 14:08:22 +02:00
ge0rdi
9878f02f70 Improve menu animation timing
Use steady_clock with 1ms resolution instead of GetTickCount that has typical resolution 10-16ms.
This should result in more smooth menu animations.
2023-06-09 14:08:22 +02:00
ge0rdi
9c149334fa Properly round font size
Use MulDiv for proper rounding to nearest integer.

Fixes #1547.
2023-05-27 13:33:41 +02:00
vodek3
faa666b54d Skin: Adding the ability to localize Immersive/Immersive7 skins 2023-02-07 19:54:54 +01:00
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
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
2023-01-19 08:27:02 +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
Eli Farmer
ecd17cb628 New default Immersive skin for Win10/11 (#538)
Fixes #538
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
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.
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
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
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