# PeekDesktop: click the wallpaper on Windows and your windows get out of the way

> PeekDesktop is an MIT licensed C# utility that brings the macOS Sonoma click-wallpaper-to-reveal-desktop behaviour to Windows 10 and 11, using Explorer's native Show Desktop by default and an optional experimental fly-away animation, with window positions restored exactly. It suits a Windows user who wants the Sonoma gesture and the tray controls that macOS does not have.

**shanselman/PeekDesktop** — Click your desktop to peek at it - just like macOS Sonoma.

- Repository: https://github.com/shanselman/PeekDesktop
- Stars: 901 · Forks: 50
- Language: C#
- License: MIT
- Published: 2026-10-20 · Updated: 2026-10-20 · Language: en
- Canonical page: https://hysenlabs.com/projects/shanselman-peekdesktop

## The Sonoma gesture, and the two ways it can be triggered

PeekDesktop brings the macOS Sonoma feature of clicking empty desktop wallpaper to reveal the desktop to Windows 10 and 11. The description in the README is that short: click your desktop to peek at it, just like macOS Sonoma.

The interaction is three steps. You click empty desktop wallpaper or empty taskbar area, not an icon and not a taskbar button, and your desktop is revealed. You stay on the desktop, and you can click or drag icons, right-click and rearrange things while the windows stay hidden. Then you click any app, the taskbar, or the wallpaper again, and everything comes right back where it was.

The detail that makes it usable rather than annoying is the second step. Clicking or dragging desktop icons normally without accidentally triggering peek is an explicit design goal, and the comparison table at the end of the README lists it as a feature both Sonoma and PeekDesktop have. The detection has to distinguish empty wallpaper from an icon, and empty taskbar space from the Start button, a pinned app or a tray icon, which is a much harder problem than it sounds.

There are two triggers, and both are configurable from the tray. Peek on Desktop Click is on by default, and Peek on Taskbar Click is optional. Turning the first one off gives taskbar-only activation, which is useful on a machine where the desktop is busy with icons. There is also a Require Double-Click toggle, for people who trigger it by accident.

A third trigger is worth knowing about, and it is the one most users will hit first. The taskbar Show Desktop button is the primary path, which the README describes as immune to keyboard remapping such as PowerToys, since it clicks the button rather than synthesising a keypress.

What arrives when you come back is more than a generic show-desktop. The README says all windows restore to exactly where they were, and the comparison table lists exact window position restore as a feature it shares with Sonoma.

## How the click is detected, window by window

The Under the Hood section is the most interesting part of the README, because the detection problem is genuinely hard and the answer is a stack of Windows APIs rather than a single trick.

SetWindowsHookEx(WH_MOUSE_LL) is a low-level mouse hook used to detect desktop clicks. WindowFromPoint identifies the window under your cursor. The hard part is the next step: MSAA hit-testing through AccessibleObjectFromPoint is what distinguishes empty wallpaper from desktop icons, so clicking an icon does not trigger a peek. UI Automation hit-testing classifies empty taskbar space without firing on Start, pinned apps or tray buttons.

For the action itself there are two paths. The taskbar Show Desktop button click is the primary one, and the Win+D SendInput approach is the fallback if the taskbar button is unavailable. Using the button rather than synthesising a keypress is what makes it immune to keyboard remappers, which the README lists as a recent addition, naming PowerToys Keyboard Manager as the specific case.

Restoring the windows exactly is the other half, and it is where most implementations of this idea fall down. EnumWindows with WINDOWPLACEMENT captures the exact position and state of every window, including whether it was maximised. SetWinEventHook(EVENT_SYSTEM_FOREGROUND) watches for when you switch back to an app, and SetWindowPlacement puts the windows back where they were.

The two requirements close the loop. No admin rights are required, and the app uses under 5 MB of RAM when idle.

That combination of hooks is also the maintenance cost. A low-level mouse hook and a foreground event hook are both process-wide, they run for as long as the app is running, and they have to coexist with the rest of the shell's own input handling. The Engineering Deep Dive document in the Docs directory is described as covering architecture, shell internals, experiments, debugging workflow, undocumented API notes and release tradeoffs, and that is where the detail about how fragile some of this is will be.

## Show Desktop against fly away, and the quirks that come with it

There are two peek styles, and the README is direct about which one to use.

Show Desktop, using Explorer, is the default and the recommended mode. It relies on Explorer's native Show Desktop behaviour, which means the shell itself does the work of hiding the windows rather than the app animating them. The consequence is that the behaviour matches what the Win+D shortcut already does on that machine, because it is the same mechanism.

Fly Away is the experimental option. It animates windows offscreen instead of hiding them, and the README describes it as fun but with known quirks with external window management, specifically Win+D and the taskbar. The warning is that it can get confused if the shell changes window state behind its back. The advice given is to use it for the visual flair but know it can misbehave.

That distinction is the practical heart of the project. The reliable path reuses an existing shell mechanism, and the novel path does something the shell does not expect, with the resulting state divergence. On a machine where anything else also manipulates windows, the experimental mode is where surprises live.

There is a related behaviour in the tray that deserves attention. Restore All Windows on App Switch is on by default, and in Explorer show desktop mode, taskbar and Alt+Tab app switches restore all hidden windows behind the selected app. In other words, the normal way you move between applications in Windows also brings the hidden windows back, which is what you want, and it is a deliberate decision rather than an accident.

The comparison table records what Sonoma does not have: system tray control, listed as not present on Sonoma. A start with Windows row also differs, since macOS uses Login Items and PeekDesktop uses the Registry, and the smooth animation row marks macOS as having it while PeekDesktop's equivalent is the fly away mode.

## Installing it: zip, winget, or build it yourself

There are three ways in, and the timing of the winget one is worth knowing before you try it.

PeekDesktop is submitted to the Windows Package Manager community repository as Hanselman.PeekDesktop when tagged releases are published, and the README notes that after the community manifest is accepted you can install it with:

```powershell
winget install Hanselman.PeekDesktop
```

The wording is conditional. Until the community manifest is accepted, that command will not find the package, so the release download is the path that works today.

The release download is a zip with no installer. There are two builds, PeekDesktop-vX.Y.Z-win-x64.zip for Intel and AMD machines and PeekDesktop-vX.Y.Z-win-arm64.zip for ARM64 hardware, named in the README as Surface Pro X and Snapdragon devices among others. You download the zip, extract it and run PeekDesktop.exe. Release builds are self-contained, so you do not need to install .NET separately.

From there the app lives in the system tray and updates itself. The README says that when a new version is available it downloads it, verifies the code signature and restarts in place, and the Auto-Updater document in Docs covers how that system works, its security model, the swap dance and its testing. A tray application that replaces its own binary while running is unusual, and it is worth reading how the signature check and the swap are done before you let it do that on a work machine.

Building from source needs the .NET 10 SDK, and the three commands are:

```bash
git clone https://github.com/shanselman/PeekDesktop.git
cd PeekDesktop
dotnet build src/PeekDesktop/PeekDesktop.csproj
```

and to run it:

```bash
dotnet run --project src/PeekDesktop/PeekDesktop.csproj
```

The same block also shows the test harnesses. There is a P/Invoke safety harness for invalid handles plus stress and leak checks, and a Windows-friendly wrapper script called test.ps1 that takes an iteration count and a verbose switch for per-test timing and leak probe diagnostics. A project that P/Invokes into undocumented shell behaviour taking the existence of handle leaks seriously is a good sign about how it was written.

## The tray menu, and the settings that matter day to day

Everything is controlled from the system tray icon, and the menu is longer than most utilities of this kind.

The first entries are the obvious ones. Enabled toggles the peek feature on and off, and Start with Windows launches it automatically at login, using the Registry rather than a Startup folder entry as the comparison table notes.

Then come the behavioural toggles. Require Double-Click optionally requires a double-click on the desktop to trigger peek. Pause While Gaming or Full-Screen is on by default for exclusive full-screen and known gaming fullscreen apps, which exists because a window that vanishes while you are playing is a bug rather than a feature.

The Peek on Desktop Click and Peek on Taskbar Click pair controls which triggers are active, and the Peek Style entry switches between Explorer and fly-away modes.

The update controls are separate from each other. Check for Updates downloads and installs a newer version on demand, and Auto-Check for Updates is on by default and silently checks on startup. Exiting is a separate item rather than being tied to closing a window, which is right for a tray application.

One small polish item is worth mentioning because it is the kind of thing that is either done or not. When Windows is in dark mode, the tray menu also follows the system theme when supported by the operating system.

The What's New list in the README gives a sense of where the project has been heading: small Native AOT single-file builds for both x64 and ARM64, the taskbar click trigger, taskbar-only activation, dark tray menu support, the taskbar button path that bypasses keyboard remappers, the gaming pause, the double-click option and the in-place auto-updater. Native AOT in particular explains how a self-contained single-file executable is possible without shipping a full .NET runtime, and it is the reason the ARM64 build is a realistic size.

## Maintenance, licence and where the project is weak

On maintenance, the repository is not archived and the last push was on 2026-09-25, on the main branch. The releases are v0.9.7 from 2026-07-10, v0.9.6 from 2026-05-18 and v0.9.5 from 2026-05-05, so the project is on a 0.9.x line with patch releases every few weeks. A version below 1.0 with a monthly cadence is a project that is stable in practice and explicitly unversioned in its contract, which is fine for a desktop utility and worth remembering if you script anything against it.

The licence is MIT, with the LICENSE file at the root of the tree, so there is no obligation around redistribution beyond the notice. The primary language is C#, and the top level holds a PeekDesktop.sln, a src/ directory, a Docs/ directory with the two named documents, a test.ps1 script, and two unusual files, taskbar-lvt.xml and taskbar-lvt-depth6.json, which are taskbar layout resources for the Light Virtualise feature that the project appears to read.

The main weakness the project itself admits to is documentation. The contributing section says documentation coverage is the weakest part of the project and that corrections there are especially useful, and it points to the Discord server as faster than an issue for anything open-ended.

That combination, thorough engineering notes and thin user-facing documentation, tells you how to read this project. The two documents under Docs/ are the real documentation. The README is the marketing summary, and the parts of the behaviour you are most likely to hit an edge case with, the taskbar click path, the fly-away quirks, the auto-updater, are the parts the deep dive covers and the README only summarises.

## Conclusion

PeekDesktop fits a Windows 10 or 11 user who wants the Sonoma click-to-peek gesture, works across multiple monitors, and would rather not install a utility that requires administrator rights, since the README states none are needed and the app idles under 5 MB of RAM. It is the wrong choice if you want the animated reveal, because the fly-away style is labelled experimental with known quirks against external window management, and it is the wrong choice if your machine is a shared or locked-down workstation where an auto-updating tray application is unwelcome. Before you install it, read the Engineering Deep Dive in the Docs directory, and note that the winget install only works after the community manifest is accepted, so the zip download is the reliable path today.

## FAQ

### How do I install PeekDesktop on Windows?

The winget command `winget install Hanselman.PeekDesktop` works once the community manifest is accepted, and the README describes it as submitted to the community repository when tagged releases are published. Otherwise download the release zip for x64 or arm64, extract it and run PeekDesktop.exe, since the release builds are self-contained.

### Does PeekDesktop need administrator rights?

No. The README states that no admin rights are required and that it uses under 5 MB of RAM when idle. It lives in the system tray and can be set to start with Windows through the Registry.

### What is the difference between the Show Desktop and Fly Away peek styles?

Show Desktop is the default and recommended mode and uses Explorer's native Show Desktop behaviour. Fly Away is experimental and animates windows offscreen, and the README warns it has known quirks with external window management such as Win+D and the taskbar.

### How do I stop the peek from triggering when I click a desktop icon?

The README lists clicking or dragging icons normally without accidentally triggering peek as a supported behaviour, achieved through MSAA hit-testing to distinguish empty wallpaper from desktop icons. There are also tray toggles for Require Double-Click and for disabling Peek on Desktop Click to leave only taskbar activation.

### Is PeekDesktop still being updated?

The repository is not archived and the last push was on 2026-09-25. The recent tags are v0.9.7 from 2026-07-10, v0.9.6 from 2026-05-18 and v0.9.5 from 2026-05-05, and the licence is MIT.

## Sources

- [Issues](https://github.com/shanselman/PeekDesktop/issues)
- [License: MIT](https://github.com/shanselman/PeekDesktop/blob/main/LICENSE)
- [README](https://github.com/shanselman/PeekDesktop/blob/main/README.md)
- [Releases](https://github.com/shanselman/PeekDesktop/releases)
- [shanselman/PeekDesktop on GitHub](https://github.com/shanselman/PeekDesktop)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/shanselman-peekdesktop
