idle_inhibit: Always listen for view_unmap

For wlr_idle_inhibit, we'd listen to inhibitor destroy, whereas for
manual idle inhibition, we'd listen for view unmap. If a view associated
with a wlr_idle_inhibit inhibitor was destroyed, we could possibly end
up with a dangling view pointer.

Always listen to view unmap to ensure we clean up properly.
This commit is contained in:
Kenny Levinsen 2021-03-16 22:36:53 +01:00
parent adf7a6f892
commit 21e33f979b
2 changed files with 19 additions and 3 deletions

View file

@ -27,6 +27,7 @@ struct sway_idle_inhibitor_v1 {
struct wl_list link;
struct wl_listener destroy;
struct wl_listener view_unmap;
};
bool sway_idle_inhibit_v1_is_active(