Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Fluid.Avalonia must live in `Application.Styles` to theme composite controls (e.
## How it works — notable mechanisms

**Activation**
- *Start-button / Win-tap interception* — the taskbar Start-button **click** is caught by a managed low-level mouse hook (`StartClickHook`). The lone **Win-tap**, which on Win 11 24H2 only surfaces *inside* the shell, is caught by the optional native bridge (`MenYou.Bridge`, C++): `BridgeInjector` installs a `WH_GETMESSAGE` hook on Explorer's UI thread via the bridge DLL and forwards `WM_COPYDATA` to `CopyDataListener`. The hook is **owned by MenYou** — so Windows unloads the DLL from Explorer when MenYou exits or is killed — and the DLL ships next to `MenYou.exe` but is **shadow-copied** to `%LocalAppData%\MenYou\bridge\` before injection, so an in-place upgrade never finds Explorer holding the installed copy. If MSVC isn't installed the DLL is absent and MenYou falls back to a managed WinEvent monitor (`StartMenuMonitor`).
- *Start-button / Win-tap interception* — the taskbar Start-button **click** is caught by a managed low-level mouse hook (`StartClickHook`). The lone **Win-tap** is caught twice over: a managed low-level keyboard hook (`WinKeyHook`) swallows the real Win-down/up (buffer-and-replay, so combos still work) and fires MenYou on a lone tap, while the optional native bridge (`MenYou.Bridge`, C++) covers the tap as it surfaces *inside* the shell on Win 11 24H2: `BridgeInjector` installs a `WH_GETMESSAGE` hook on Explorer's UI thread via the bridge DLL and forwards `WM_COPYDATA` to `CopyDataListener`. The hook is **owned by MenYou** — so Windows unloads the DLL from Explorer when MenYou exits or is killed — and the DLL ships next to `MenYou.exe` but is **shadow-copied** to `%LocalAppData%\MenYou\bridge\` before injection, so an in-place upgrade never finds Explorer holding the installed copy. If MSVC isn't installed the DLL is absent, injection quietly no-ops, and the managed hooks carry the interception alone.
- *Shift+Win hotkey* — registered via `RegisterHotKey`. Bare Win can't be reliably intercepted from outside the shell on Win 11 24H2, so Shift+Win is the toggle (the approach Open-Shell also recommends).
- *Foreground activation* — Win 11's focus-stealing prevention leaves a freshly shown window inactive, so `Win32Foreground.Bring` does the `AttachThreadInput` → `SetForegroundWindow` dance.
- *Window sizing re-measure* — the five layouts are stacked in one `SizeToContent` window gated by `IsVisible`; `ShowMenu` toggles `SizeToContent` after bindings resolve so the window fits only the active layout.
Expand Down Expand Up @@ -76,7 +76,7 @@ dotnet build src/MenYou/MenYou.csproj
src/MenYou/bin/Debug/net10.0-windows/MenYou.exe
```

The `BuildNativeBridge` MSBuild target runs `tools/build-bridge.ps1` first; it locates VS's `msbuild` via `vswhere` and exits 0 if MSVC is missing (MenYou then runs on the managed fallback). Companion `CopyNativeBridge*` targets copy the built `MenYou.Bridge.dll` next to `MenYou.exe` for both `dotnet build` and `dotnet publish`, so it ships in the installer. A tray icon appears on launch — press **Shift+Win** to toggle the menu.
The `BuildNativeBridge` MSBuild target runs `tools/build-bridge.ps1` first; it locates VS's `msbuild` via `vswhere` and exits 0 if MSVC is missing (MenYou then runs on the managed hooks alone). Companion `CopyNativeBridge*` targets copy the built `MenYou.Bridge.dll` next to `MenYou.exe` for both `dotnet build` and `dotnet publish`, so it ships in the installer. A tray icon appears on launch — press **Shift+Win** to toggle the menu.

## Branding

Expand Down
271 changes: 0 additions & 271 deletions src/MenYou/Platform/Windows/StartMenuMonitor.cs

This file was deleted.

Loading