summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-12-16 17:24:45 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-12-16 17:37:18 -0600
commit7b1fe7e5f2b92f025063cc98ebdb1791945e2f4a (patch)
tree9e4cabab7654901af3b8c0d2efa306bdad6e73be
parent803a9ba98d6976c71e92973e3af6096476984fa3 (diff)
fix checking idle inhibit state
checking `bypass_surface_visibility` first, could cause that even if the idle inhibitor is being destroyed it will disable idle tracking and if we couldn't get its scene tree, then assume that the surface is visible
-rw-r--r--dwl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dwl.c b/dwl.c
index 2bcb8b1..f535baf 100644
--- a/dwl.c
+++ b/dwl.c
@@ -627,8 +627,8 @@ checkidleinhibitor(struct wlr_surface *exclude)
wl_list_for_each(inhibitor, &idle_inhibit_mgr->inhibitors, link) {
struct wlr_surface *surface = wlr_surface_get_root_surface(inhibitor->surface);
struct wlr_scene_tree *tree = surface->data;
- if (bypass_surface_visibility || (exclude != surface
- && tree && tree->node.enabled)) {
+ if (exclude != surface && (bypass_surface_visibility || (!tree
+ || tree->node.enabled))) {
inhibited = 1;
break;
}