Re: [PATCH v5 0/1] MR11178: winewayland: Implement xdg-popup for unmanaged windows.
Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/window.c:
+ if (!(managed = is_window_managed(hwnd, swp_flags, fullscreen)) && surface) + { + owner = owner_hint; + toplevel = NULL; + } + + TRACE("hwnd %p owner %p toplevel %p new_rects %s after %p flags %08x\n", hwnd, + owner, toplevel, debugstr_window_rects(new_rects), insert_after, swp_flags);
if (!(data = wayland_win_data_get(hwnd))) return; toplevel_data = toplevel && toplevel != hwnd ? wayland_win_data_get_nolock(toplevel) : NULL; toplevel_surface = toplevel_data ? toplevel_data->wayland_surface : NULL; + owner_data = owner && owner != hwnd ? wayland_win_data_get_nolock(owner) : NULL; + owner_surface = owner_data ? owner_data->wayland_surface : NULL; + /* for it to be a popup, we need a valid xdg surface. + * Demote to a subsurface instead if this condition is not met. */ Any reason we don't simply use xdg_popup instead of subsurface? IIUC this is only there for the case owner itself is a subsurface, but if every surface was an xdg_surface (eventually xdg_popup) we wouldn't need the subsurface case?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11178#note_143726
participants (1)
-
Rémi Bernon (@rbernon)