In the world of content creation, we all occasionally encounter frustrating technical hurdles. I recently had to look into a recurring issue on Windows 11 involving how OBS Studio handles "always-on-top" windows.
This problem arises because when you enable the "Always on Top" option for a window, Windows assigns it a special status: WS_EX_TOPMOST. This classification places it above all other windows, even when it is not the active one. The Windows Desktop Window Manager (DWM) then handles it within a separate display layer.
The core of the issue lies in how OBS captures these windows. On Windows 11, the default mode is Windows Graphics Capture (WGC). When OBS requests that Windows render a specific window, and a TOPMOST window happens to be positioned in front of it, Windows—for the sake of optimization—considers the underlying window to be partially obscured. Consequently, instead of transmitting a complete image, it provides a black or frozen texture. This is somewhat analogous to the xcomposite mechanism in Linux, where an overlapping window prevents the redirection of the window beneath it.
Windows 11 has exacerbated this phenomenon. While OBS could still fall back on the legacy "BitBlt" capture method in Windows 10, Windows 11—with its various graphical optimizations and visual effects, such as rounded corners and the "Mica" material—increasingly necessitates the use of WGC. Furthermore, WGC is significantly more sensitive to occlusion than previous methods.
The direct consequence is this: if an "always-on-top" window is positioned in front of the game or browser you intend to capture, OBS may end up capturing that TOPMOST window instead—even if you had specifically selected the other window as your source. To me, this situation serves as a reminder that it is essential to understand the underlying workings of the tools we use. These "bugs" are often merely a reflection of the optimizations and architectural choices made within operating systems. The trick lies in knowing how to observe and understand these mechanisms, and then adapting our approach accordingly. While this certainly requires patience, it also serves as a source of continuous learning—one that enriches both our professional practice and our understanding of the digital world. Such technical challenges push us to become better creators: more resilient and more resourceful.