Commit Graph

20 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
9397d58986 Show Open-Shell version in start context menu
Fixes #888.
2022-12-06 19:17:18 +01:00
thisismy-github
8031739110 Added option to customize Pinned folder location
Items can be pinned to directories that require administative privileges
(such as Open-Shell's default installation directory), so long as users
take ownership of the pinned folder. Also adds a command to Open-Shell's
context menu that opens the current pinned folder.

Adds general support for directory-based settings by creating a new
setting type called TYPE_DIRECTORY which uses a new bool added to
BrowseLinkHelper, called bFoldersOnly. START_MENU_PINNED_ROOT
has been removed, and all instances of both it and BrowseLinkHelper
have been adjusted accordingly. To create your own directory-based
settings, use CSetting::TYPE_DIRECTORY. Empty directory paths are
reset to their default value as they can cause unexpected behavior.
2022-08-13 16:00:26 -04:00
thisismy-github
ef663d2051 Added option to set custom commands for controls
Includes a unique option for each control and supports environment
variables.
2022-08-13 16:00:26 -04:00
germanaizek
4f362760b6 Remove unused vars, usage '= default;' and fixed lower scope 2022-05-12 20:54:42 +02:00
ge0rdi
a5f35b133f Improve compatibility with WindowBlinds
`Open-Shell` hooks `SHFillRectClr` (ordinal 197) API from `shlwapi.dll`
in order to be able to customize taskbar.

The API is hooked even if taskbar customization is disabled in `Open-Shell` (default).

`WindowBlinds` hooks the same API so this is causing clashes between
both programs.
In fact `Open-Shell` hooks later which makes `WindowBlinds` hook to be
completely ignored.

The solution would be to hook only if taskbar customization is enabled.

This way `Open-Shell` should be more compatible with other customization
tools in default state.

Fixes #433.
2020-10-23 10:13:57 +02:00
ge0rdi
fe47f841e7 Don't close menu(s) on certain operations
In several cases we don't want menu(s) to close when an action on menu was
done. For example on drag-n-drop or menu item deletion (where confirmation
dialog is shown).

In such situations `s_bPreventClosing` was set to true (and then back to
false when closing was allowed again).
Though original code honored this variable only in certain situations and
typically (at least on Win10) menus were hidden/closed despite of it.

This patch changes the behavior and menus(s) are not closed when
`s_bPreventClosing` is set to true.
Basically now menu(s) stay visible until there is an action that changes
active window.

Following functionality was also removed because it is not needed now:

* CMenuContainer::HideTemp
* COwnerWindow::OnClear
  WM_CLEAR was sent to the window only by already removed `HideTemp`
2019-10-26 20:29:23 +02:00
ge0rdi
16de25a8b0 Use C++17 by default
Plus C++ standard conformance fixes.
2018-08-18 20:04:21 +02:00
ge0rdi
2fb9448ffd Few improvements (#65)
* Fix naming inconsistencies

'Menu' vs 'StartMenu'

* Installer: Remove Facebook link

* Installer: Remove PayPal donate remnants

* OpenShellReadme: Remove info about product version
2018-08-13 00:28:42 -04:00
Xenhat
f4dd56155b Rebrand to Open-Shell (#36) (#58)
* Rebrand to Open-Shell

* Slight installer branding improvement
2018-08-05 15:22:10 -04:00