previously we disable idle tracking simply due to the fact that it exist
5IA7GZ3YCEHSL6MWQK4XE6ZSZ2LDT4S7QUPEZOYKIPYQHPGXXA4QC
7ZK56K2OJMLPRLAOJJR57GO5D6TQ2RB5RZTX2BWGWIZGY2DQH6QQC
YQQETCXBXPPLXBU3UPUIIKB3JZCHRFSW7PPP2DR436WVIXNXFUHAC
Q3BFKMS4YCHJ66QGNXGPCBEL5HOL5VXNJNR7MZEY4TPO2XH2C4KAC
BJTFRPISAH2XAAVR5XVG4EU5E5HU5RX3YOSV4TYZ2GP2ZAXZC2JAC
7B74AT3BXYB7PVW4F6SGQNPMHOU5TEV5TZ54CG6VSQI46XSEKWXQC
QAPSVUOF7DV6R2PSLKLZUKC5TMB62ZYOUZ2NA6CHFOU6PSTJULWAC
OEUI55XGUBOPUZYV3CGHVZOTXTUU57ZWDGTLQH6FC7FMMUQL4CRQC
}
void
checkidleinhibitor(struct wlr_surface *exclude)
{
Client *c, *w;
int inhibited = 0;
struct wlr_idle_inhibitor_v1 *inhibitor;
wl_list_for_each(inhibitor, &idle_inhibit_mgr->inhibitors, link) {
c = client_from_wlr_surface(inhibitor->surface);
if (exclude && (!(w = client_from_wlr_surface(exclude)) || w == c))
continue;
if (!c || VISIBLEON(c, c->mon)) {
inhibited = 1;
break;
}
}
wlr_idle_set_enabled(idle, NULL, !inhibited);
/* I've been testing and at this point the inhibitor has not yet been
* removed from the list, checking if it has at least one item. */
wlr_idle_set_enabled(idle, seat, wl_list_length(&idle_inhibit_mgr->inhibitors) <= 1);
/* `data` is the wlr_surface of the idle inhibitor being destroyed,
* at this point the idle inhibitor is still in the list of the manager */
checkidleinhibitor(data);