inhibit idle if fullscreen client is focused

This commit is contained in:
korei999 2024-01-01 19:18:41 +02:00
parent 9b2966d27c
commit 5adc681b87

4
dwl.c
View file

@ -689,6 +689,7 @@ chvt(const Arg *arg)
void void
checkidleinhibitor(struct wlr_surface *exclude) checkidleinhibitor(struct wlr_surface *exclude)
{ {
Client *c = focustop(selmon, 0);
int inhibited = 0, unused_lx, unused_ly; int inhibited = 0, unused_lx, unused_ly;
struct wlr_idle_inhibitor_v1 *inhibitor; struct wlr_idle_inhibitor_v1 *inhibitor;
wl_list_for_each(inhibitor, &idle_inhibit_mgr->inhibitors, link) { wl_list_for_each(inhibitor, &idle_inhibit_mgr->inhibitors, link) {
@ -701,6 +702,9 @@ checkidleinhibitor(struct wlr_surface *exclude)
} }
} }
if (c && c->isfullscreen)
inhibited = 1;
wlr_idle_notifier_v1_set_inhibited(idle_notifier, inhibited); wlr_idle_notifier_v1_set_inhibited(idle_notifier, inhibited);
} }