8000 GitHub - bleze/AlwaysOnTop · GitHub
[go: up one dir, main page]

Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

Repository files navigation

AlwaysOnTop

A lightweight Windows tray utility that adds Always on Top and Hide Window to every window's system menu.

Right-click a window title bar (or its taskbar button, or press Alt+Space) and toggle Always on Top with a checkmark showing the current state, or choose Hide Window to make it fully invisible. Hidden windows have no title bar to right-click, so they can only be restored from the tray icon's Manage Windows dialog.

How it works

  • AlwaysOnTop.exe runs in the notification area and loads AlwaysOnTopHook.dll.
  • The hook DLL installs global WH_SHELL, WH_CALLWNDPROC, and WH_GETMESSAGE hooks.
  • When a window's system menu opens, Always on Top, Hide Window, and Hide in Tray items are injected.
  • Selecting Always on Top toggles HWND_TOPMOST via SetWindowPos.
  • Selecting Hide Window calls ShowWindow(SW_HIDE) and tags the window so it shows up in the Manage Windows dialog.
  • Selecting Hide in Tray hides the window the same way but also gives it its own tray icon, using its process's icon and name; left-click it to restore the window, right-click for a menu. Use it for windows you want back quickly, and plain Hide Window for ones you just want out of the way.
  • The tray icon's Manage Windows dialog lists every pinned and/or hidden window (with its state) and can unpin/unhide them, individually or all at once.
  • The app follows the system light/dark theme setting for its own dialogs.

Build

Requirements: Windows 10+, CMake 3.25+, MSVC (Visual Studio 2022/2026).

cmake -S . -B build -G "Visual Studio 18 2026" -A x64
cmake --build build --config Release

Output:

build/Release/AlwaysOnTop.exe
build/Release/AlwaysOnTopHook.dll

Both files must stay in the same directory.

Releases

Pushing a tag matching v*.*.* (e.g. v0.1.0) triggers a GitHub Actions workflow that builds the Release binaries, packages them into an Inno Setup installer, and publishes both the installer and a portable zip to a GitHub Release.

Usage

  1. Run AlwaysOnTop.exe.
  2. Right-click any window title bar.
  3. Choose Always on Top to pin it, or Hide Window to hide it.
  4. Right-click the tray icon and choose Manage Windows... to see pinned/hidden windows and restore them.
  5. Right-click the tray icon and choose Quit to stop the utility.

Limitations

  • Elevated windows (Run as administrator) require AlwaysOnTop to run elevated as well. Use Restart as Administrator in the tray menu to relaunch it elevated; hidden windows carry over.
  • Task Manager has its own Settings → Window management → Always on top option, which can't be kept in sync from outside, so AlwaysOnTop doesn't offer Always on Top for Task Manager (Hide Window and Hide in Tray still work). Use that setting instead.
  • Some modern apps (UWP, custom chrome) may not expose a standard system menu.
  • Global hooks load a DLL into other processes; some security software may flag this behavior.
  • Pinned/hidden state isn't persisted anywhere; it lives only as long as the target window itself does. If you quit AlwaysOnTop.exe while a window is hidden, relaunch the app and use Manage Windows to restore it.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0