aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-11-13 16:46:43 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-11-21 14:28:04 -0600
commit60a98b87f395618be8d35c1100e019588e255d78 (patch)
tree5326b67fa6ebbcdfae34f90b12ebaf39eee79ee3 /dwl.c
parent93a911d6e93f760a5139bfe0d1c1eb90886c414f (diff)
inhibit idle if surface's node is enabled
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/dwl.c b/dwl.c
index 8599764..949f7b3 100644
--- a/dwl.c
+++ b/dwl.c
@@ -588,15 +588,12 @@ chvt(const Arg *arg)
void
checkidleinhibitor(struct wlr_surface *exclude)
{
- Client *c;
int inhibited = 0;
+ struct wlr_scene_tree *tree;
struct wlr_idle_inhibitor_v1 *inhibitor;
wl_list_for_each(inhibitor, &idle_inhibit_mgr->inhibitors, link) {
- /* In case we can't get a client from the surface assume that it is
- * visible, for example a layer surface */
- if (exclude != inhibitor->surface
- && (!(c = client_from_wlr_surface(inhibitor->surface))
- || VISIBLEON(c, c->mon))) {
+ if (exclude != inhibitor->surface && (tree = inhibitor->surface->data)
+ && tree->node.enabled) {
inhibited = 1;
break;
}