From 5adc681b878c6abc81c346582cb34254a5bf58c3 Mon Sep 17 00:00:00 2001 From: korei999 Date: Mon, 1 Jan 2024 19:18:41 +0200 Subject: [PATCH] inhibit idle if fullscreen client is focused --- dwl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dwl.c b/dwl.c index 04c1820..8a28ead 100644 --- a/dwl.c +++ b/dwl.c @@ -689,6 +689,7 @@ chvt(const Arg *arg) void checkidleinhibitor(struct wlr_surface *exclude) { + Client *c = focustop(selmon, 0); int inhibited = 0, unused_lx, unused_ly; struct wlr_idle_inhibitor_v1 *inhibitor; 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); }