7UDWES3V56FD5L7VJXSFC6POZ7SXN4Z2JNJQ3XBVN7KBZD6AXTDQC
XEH27JOXKCN2VZ54BWMIWEVW4IBS2QNU3534SJAPPI3Z4GKBM24QC
UDZ2EERBTYRBS54DVKWXAOQY33RXW3SMWZY5KHYDXVWLDY6LL3RQC
6V3JKJZJ7KBS5I3Q266ZCRJYVO56ZQKLJL4EOHN6XC222CZFXCDQC
MZ734MOA6IYZE7SDSQGTBLYUF5VWLLK7M7E6T3KIY6DBEJR3CFMAC
7B74AT3BXYB7PVW4F6SGQNPMHOU5TEV5TZ54CG6VSQI46XSEKWXQC
DADSQJFKYX6U5JOHSHJWWDSUFC7ZWSZVHFMEKPZEXKPELMEQBL2QC
VCNLR5X75OAXVKPZQHF5RUZ7BONBUC6RPGO2NZEUD3FZ7TEVL66AC
UCSTVE5NIAIQ3NJL5YLDFDKDPOCJS6NMAGABSWG67RGCPH47JQEQC
ZIXAFAJJEKSFECJJW57MQ2Z666IZSJXU5FVAQ2JLG34BEJIV322AC
LJJH53FPOX3RP5PCHNORRMTUSV4DXYYP2A47X6VDZ5KZI6T2DEOAC
J6OSBEBQXZR5JZ5TOCCUPELBPUVEQULGCXURXLPY7WFYTDEQOU2AC
4QUF4MKRSB5LYYS5FSYTCDSIEMYIERI2BQZLRGJ3GIGVYCPJVEPAC
HWS332I73ETH3YIIOCQO7WB7VPQICME6GGXFJ7EUWDH5O3KA27QQC
OYZELWD247C2GT4QAW6YECUCA2GRLG4VI25BMOZKOGNRKERPZ6AQC
}
else if ((surface = xytolayersurface(&selmon->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
cursor->x, cursor->y, &sx, &sy)))
;
else if ((surface = xytolayersurface(&selmon->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],
cursor->x, cursor->y, &sx, &sy))) { // gcc complains without these braces
;
struct wlr_surface *
xytolayersurface(struct wl_list *layer_surfaces, double x, double y,
double *sx, double *sy)
{
LayerSurface *layersurface;
wl_list_for_each_reverse(layersurface, layer_surfaces, link) {
struct wlr_surface *sub = wlr_layer_surface_v1_surface_at(
layersurface->layer_surface,
x - layersurface->geo.x,
y - layersurface->geo.y,
sx, sy);
if (sub)
return sub;
}
return NULL;
}