Re: [PATCH v5 0/1] MR11178: winewayland: Implement xdg-popup for unmanaged windows.
On Sat Jun 20 18:16:27 2026 +0000, Etaash Mathamsetty wrote:
Windows' child windows map almost perfectly to wayland subsurfaces. And xdg-popup is intended to be a temporary. Few other reasons: 1. Alpha modifier on the toplevel is only applied on subsurfaces not popups. (The spec wording doesn't say this, but it's supposed to. I'll make a MR to Wayland protocols eventually) 2. When a toplevel is unmapped or roleless (no WS_VISIBLE) during initialization but an app creates child windows on it we can still utilize subsurfaces to configure the window so when the toplevel gains WS_VISIBLE all the subsurfaces are set up. (At least this is how I assume windows would work too, but I'm not sure) 3. xdg-popup has issues on compositors wrt keeping the windows together. For example on kwin if I minimize a window with a pop-up open then the pop-up doesn't minimize with the toplevel. This is a compositor bug afaik but numerous compositors share this bug (and the same happens on xwayland). If we try to use subsurfaces in the cases where it makes sense we avoid problems. 4. Compositors still have a lot of control over the exact position a popup shows up (they can change it to be whatever they want). That isn't true for subsurfaces. Actually, I completely forgot that subsurfaces don't actually have any window contents unless it is a client surface, since all window contents are on the toplevel. In that case we could completely get rid of subsurfaces in theory, but then we would need to figure out how to parent the xdg-popup.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11178#note_143760
participants (1)
-
Etaash Mathamsetty (@etaash.mathamsetty)