mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-26 03:06:30 +00:00
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
This commit is contained in:
parent
803a9ba98d
commit
7b1fe7e5f2
1 changed files with 2 additions and 2 deletions
4
dwl.c
4
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue