Skip to content

IMUTshuaiwei/deskpin-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

DeskPins for Rust

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!

Build

# requires Rust + MSVC toolchain
cargo build --release --target x86_64-pc-windows-msvc
# output: target\release\deskpins.exe

Usage

  1. Run deskpins.exe — pin icon appears in the system tray.
  2. Left-click tray → enter pin mode (cursor becomes thumbtack).
  3. Click any window → pinned on top; small pin appears in caption.
  4. Click the pin → unpin.
  5. 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages