diff options
author | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-11-30 18:54:54 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-11-30 18:54:54 -0600 |
commit | 6df6781b437937e835d8caca14024829747bd2ab (patch) | |
tree | 43b1507d9beb7c01ff3a3b59fd6dc63fad9bf56c | |
parent | 10c56d63489506ee852f3ec18f078e60ba1885f0 (diff) |
simplify check for surface's node state
all `struct wlr_surface` should have a `wlr_scene_tree *` as data
-rw-r--r-- | dwl.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |