You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows transparent overlay: window-space UI HUDs clipped by the SetWindowRgn silhouette #350
In a transparent-overlay app on Windows (lenovo-avatar), the window-space UI HUDs (DisplayXRWindowSpaceUI, composited by the runtime as XrCompositionLayerWindowSpaceDXR layers) are clipped by the avatar silhouette.
The transparent overlay calls SetWindowRgn with the silhouette (displayxr_set_overlay_hit_mask / _hit_rect / _surround_rect / _surround_mask in native~/displayxr_win32.c). SetWindowRgn is a visual clip, not only a hit mask: every pixel outside the region does not exist for the window, post-weave composition layers included. So any part of a HUD outside the silhouette is cut away.
Reference designs
The DisplayXR model viewer hits the same problem with its toasts and unions its "chrome" rects (toast band, button bars, bubbles) into the region. See displayxr-common common/vk_clickthrough_region.h ("THE REGION IS A VISUAL CLIP, NOT ONLY A HIT MASK").
Native knows every wsui slot's fractional rect and disparity (displayxr_window_space_ui.cpp), so displayxr_win32.c should union each live slot's client-pixel rect (widened by half the disparity on each side) into the region in every path that builds it (hit mask, AABB hit rect, surround union). Hidden or disabled HUDs (slot released, or no texture) must stay out. The HUD rects must feed the region hash, so toggling a HUD updates the region while a static HUD causes no per-frame SetWindowRgn.
Activity
fix(win32): union live window-space UI HUDs into the overlay region (#…