1. Context
Veil allows users to apply customized dimming overlays across multiple monitors to reduce eye strain and eliminate visual clutter. The app features an experimental "Focus Mode" which intelligently keeps only the currently active window fully illuminated while the surrounding environment fades into the background.
2. The Problem
After releasing the initial version of Focus Mode, user feedback quickly highlighted a critical gap between how the Windows OS manages active windows and how a human actually perceives their workflow.
Technical Reality
Windows treats transient UI elements—like right-click context menus and browser tab previews—as entirely separate, newly focused windows.
The UX Friction
If the dimming logic strictly followed the OS, right-clicking in a browser would instantly plunge the main browser window into darkness, isolating only the tiny menu in a bright spotlight.
The feedback revealed that this jarring visual flash broke the user's continuous flow, as it violated their mental model (where the browser and the menu are perceived as a single task).
3. The Solution
To bridge this gap, I engineered a solution that treats related UI components as a single, cohesive unit, bypassing the OS's rigid window boundaries.
-
1Parent-Child Grouping
I modified the focus algorithm to recognize the hierarchical relationship between windows.
-
2Unified Highlighting
When a transient menu or tab preview opens, Veil now keeps the parent window (e.g., the browser) fully illuminated, seamlessly extending the highlight to include the new child element.
-
3Win32 API Integration
I utilized
win32gui.GetAncestor(withGA_ROOTandGA_ROOTOWNERflags) andGW_OWNERto trace the window hierarchy and map transient UI elements back to their root application window.
The result is a smooth interaction that matches cognitive expectations—menus and their parent apps feel like one connected, visually stable experience.
4. Design Thinking
This implementation was driven by a commitment to Context Preservation and the principle of Recognition over Recall.
Feedback-Driven Friction Solving
By aligning the system's technical behavior with the user's natural mental model, I rapidly iterated on user feedback to solve a major friction point, ensuring the app remains a supportive tool rather than a disruptive one.
Next Steps
To further optimize this feature, I would implement telemetry to measure rendering latency during rapid context-switching, ensuring the highlight follows the user's focus with absolutely zero visual lag.