All the XDG surface iterator does is iterate the main wlr_surface, then iterate the popups. If we inline that function, we can merge part of it with the X11 case.
BE2WICFCSLQ4BYXGGLGJ5WNVX554FZDXI26MZCLIY46W4M7HVGEAC
2GP4MXKEDQMZ7E6TCRSMV2AGN7HLEAHR3QEAC2QFCQQNPMNJSIHQC
/* Leave this function first; it's used in the others */
/* Leave these functions first; they're used in the others */
static inline struct wlr_surface *client_surface(Client *c){#ifdef XWAYLAND if (client_is_x11(c)) return c->surface.xwayland->surface;#endif return c->surface.xdg->surface;}
static inline struct wlr_surface *
client_surface(Client *c)
{
#ifdef XWAYLAND
if (client_is_x11(c))
return c->surface.xwayland->surface;
#endif
return c->surface.xdg->surface;
}
wlr_surface_for_each_surface(client_surface(c), fn, data);
if (client_is_x11(c)) { wlr_surface_for_each_surface(c->surface.xwayland->surface, fn, data);
if (client_is_x11(c)) {
wlr_surface_for_each_surface(c->surface.xwayland->surface,
fn, data);
wlr_xdg_surface_for_each_surface(c->surface.xdg, fn, data);
wlr_xdg_surface_for_each_popup_surface(c->surface.xdg, fn, data);
client_surface(Client *c){#ifdef XWAYLAND if (client_is_x11(c)) return c->surface.xwayland->surface;#endif return c->surface.xdg->surface;}static inline struct wlr_surface *