diff options
| author | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-12-02 22:53:03 -0600 | 
|---|---|---|
| committer | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-12-02 23:25:46 -0600 | 
| commit | fac3b6f2cf7e2d5e9de2b0618a5a2ad2e0809b03 (patch) | |
| tree | 8e5c9370eadb4588ee88694cd855d96aec692600 | |
| parent | 035bb99d67b59a84cfc2e911d222fb597591a8be (diff) | |
use root surfaces to check idle inhibitors
References: https://github.com/djpohly/dwl/pull/343
Diffstat (limited to '')
| -rw-r--r-- | dwl.c | 7 | 
1 files changed, 4 insertions, 3 deletions
| @@ -596,8 +596,9 @@ checkidleinhibitor(struct wlr_surface *exclude)  	int inhibited = 0;  	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 +		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->node.enabled)) {  			inhibited = 1;  			break; @@ -1014,7 +1015,7 @@ destroyidleinhibitor(struct wl_listener *listener, void *data)  {  	/* `data` is the wlr_surface of the idle inhibitor being destroyed,  	 * at this point the idle inhibitor is still in the list of the manager */ -	checkidleinhibitor(data); +	checkidleinhibitor(wlr_surface_get_root_surface(data));  }  void | 
