Expand description
Win32 frameless window setup + wndproc subclass. Extracted from client/mod.rs in task #182 PR-G.
Statics§
- FOCUS_
RESTORE_ 🔒WNDPROCS - Map of top-level HWND -> original WndProc for the focus-restore subclass
installed by
install_top_level_focus_restore_hook. Kept separate fromORIGINAL_WNDPROCSso the two hooks can coexist on the same HWND in either order (the focus-restore hook always passes through to its own recorded original, which transitively walks back through any other hook). - ORIGINAL_
WNDPROCS 🔒 - Map of HWND -> original WndProc for secondary windows with edge resize hooks. Stored here instead of GWLP_USERDATA to avoid clobbering CEF’s data.
Functions§
- install_
frameless_ 🔒 ⚠resize_ hook - Install a WndProc hook on a SECONDARY window that handles:
- install_
top_ 🔒 ⚠level_ focus_ restore_ hook - Subclass a top-level window’s WndProc to handle
WM_ACTIVATE: when the window is being activated (wparam != WA_INACTIVE), look up the last intentionally-focused child for this root inLAST_FOCUSED_BY_ROOTandSetFocusit. Closes the alt-tab-back-and-input-drops bug. - set_
window_ 🔒 ⚠icon - Load the app icon from the exe’s embedded resource and set it on the window. This makes the icon appear in the taskbar and Alt+Tab switcher instead of the default CEF/Chromium icon.
- setup_
native_ 🔒 ⚠frameless - Set up a native frameless window: extend client area over the thick frame border so the resize handle is invisible, then subclass the window to handle WM_NCHITTEST for edge resize.
- skip_
taskbar 🔒 ⚠ - Hide the given top-level HWND from the Windows taskbar via
ITaskbarList::DeleteTab. The window remains fully usable — Alt-Tab still finds it, it takes focus, repaints, etc. — but the shell paints no taskbar button for it regardless of the user’s “Combine taskbar buttons” setting.