aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-11-30 18:54:54 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-11-30 18:54:54 -0600
commit6df6781b437937e835d8caca14024829747bd2ab (patch)
tree43b1507d9beb7c01ff3a3b59fd6dc63fad9bf56c
parent10c56d63489506ee852f3ec18f078e60ba1885f0 (diff)
simplify check for surface's node state
all `struct wlr_surface` should have a `wlr_scene_tree *` as data
-rw-r--r--dwl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/dwl.c b/dwl.c
index f07a867..3f6db50 100644
--- a/dwl.c
+++ b/dwl.c
@@ -594,11 +594,10 @@ void
checkidleinhibitor(struct wlr_surface *exclude)
{
int inhibited = 0;
- struct wlr_scene_tree *tree;
struct wlr_idle_inhibitor_v1 *inhibitor;
wl_list_for_each(inhibitor, &idle_inhibit_mgr->inhibitors, link) {
+ struct wlr_scene_tree *tree = inhibitor->surface->data;
if (bypass_surface_visibility || (exclude != inhibitor->surface
- && (tree = inhibitor->surface->data)
&& tree->node.enabled)) {
inhibited = 1;
break;