Faithful Rust reimplementation of DeskPins
by Elias Fotinis — make any Windows application always-on-top.
Features (identical to original)
Feature
Detail
System tray icon
Click to enter pin mode; right-click for menu
Pin mode
Cursor becomes a thumbtack; click any window to pin it
Caption pin widget
Small coloured pin drawn beside caption buttons; click to unpin
Toggle hotkey
Global hotkey to toggle pin on the foreground window
Auto-pin
Monitor new windows and pin those matching title/class rules
Options dialog
Pins · Auto-Pin · Hotkeys tabs, registry persistence
VCL / proxy mode
Tracks hidden-root and VCL apps correctly
Single instance
Second launch brings the running instance to the front
Architecture (mirrors original exactly)
Rust module
C++ original
Responsibility
main.rs
deskpins.cpp
Entry point, message loop, single-instance
mainwnd.rs
mainwnd.cpp
EFDeskPins hidden window, tray, commands
layer_wnd.rs
pinlayerwnd.cpp
EFPinLayerWnd transparent capture window
pin_wnd.rs
pinwnd.cpp
EFPinWnd caption pin widget + timer tracking
pin_shape.rs
pinshape.cpp
GDI pin bitmap + shaped-window region
options.rs
options.h/cpp
Registry load/save, hotkeys, autopin rules
autopin.rs
apputils.cpp
SetWinEventHook window-creation monitor
opts_dlg.rs
optionsdlg.cpp+tabs
Options dialog (tabbed, in-memory Win32)
tray.rs
trayicon.cpp
Shell_NotifyIconW wrapper
app.rs
app.h
Global AppState in thread_local!
# requires Rust + MSVC toolchain
cargo build -- release -- target x86_64- pc- windows- msvc
# output: target\release\deskpins.exe
Run deskpins.exe — pin icon appears in the system tray.
Left-click tray → enter pin mode (cursor becomes thumbtack).
Click any window → pinned on top; small pin appears in caption.
Click the pin → unpin.
Right-click tray → New Pin / Remove All / Options / About / Exit .
Differences from original
Area
Original
This port
Language
C++ / Boost / eflib
Pure Rust, windows crate only
Resources
.ico, .cur, .bmp files
All drawn at runtime with GDI
Options UI
Full property-sheet with Boost.Foreach
Handcrafted Win32 tab dialog
Help system
.chm file
README only
Auto-pin rules UI
Full list editor
Persisted; UI shows placeholder