HNCOIBG56SF5Q55XJDIHSN67EKDV5ZLGEII5XT5S7FX5UXM34KWAC
6V3JKJZJ7KBS5I3Q266ZCRJYVO56ZQKLJL4EOHN6XC222CZFXCDQC
MZ734MOA6IYZE7SDSQGTBLYUF5VWLLK7M7E6T3KIY6DBEJR3CFMAC
7B74AT3BXYB7PVW4F6SGQNPMHOU5TEV5TZ54CG6VSQI46XSEKWXQC
F72VJF4KJZEYZEYGAGKCWPMEQGPKS7T5PEEJPJKZO6ZG246TTLAQC
IWYHVSLDXIRLG2CZRN46XQFZKBRXCKKD6ME24XC5KFZRDOBGBTQQC
DEYEAIOK6XPZXJXKS4S6EFXRZL7U65VBC2T3ABPDTSTEQRBXY25AC
UCSTVE5NIAIQ3NJL5YLDFDKDPOCJS6NMAGABSWG67RGCPH47JQEQC
W32YIHMVPAREXUADJOAX45B6CTXZY42EE77RDDZYNJFEE2HLQ3HAC
J6OSBEBQXZR5JZ5TOCCUPELBPUVEQULGCXURXLPY7WFYTDEQOU2AC
3EDO6OUSMQ77E3GRBT5QDQ556NF4YEU4LMRXT5IU2MQVOG2D3KUAC
SNQHJSWQWDVQ6DQDHIZSSE6SIKWSPLTPSCBM5DFKRCKFL4XHEZDQC
c = xytosurface(cursor->x, cursor->y, &surface, NULL, NULL);
if (c)
if ((c = xytoclient(cursor->x, cursor->y))) {
surface = wlr_xdg_surface_surface_at(c->xdg_surface,
cursor->x - c->geom.x - c->bw,
cursor->y - c->geom.y - c->bw, NULL, NULL);
}
Client *
xytosurface(double x, double y,
struct wlr_surface **surface, double *sx, double *sy)
{
Client *c = xytoclient(x, y);
/*
* XDG toplevels may have nested surfaces, such as popup windows
* for context menus or tooltips. This function tests if any of
* those are underneath the coordinates x and y (in layout
* coordinates). If so, it sets the surface pointer to that
* wlr_surface and the sx and sy coordinates to the coordinates
* relative to that surface's top-left corner.
*/
/* XXX set *surface to xdg_surface->surface otherwise? what should
* sx/sy be in that case? */
if (c)
*surface = wlr_xdg_surface_surface_at(c->xdg_surface,
x - c->geom.x - c->bw,
y - c->geom.y - c->bw, sx, sy);
return c;