criteria: Add additional call sites

Now that there are criteria that can be re-executed on state change and
match the state of keyboard shortcuts inhibitors, add additional
criteria execution call sites right after keyboard shortcuts inhibitor
state changes. This allows to immediately and efficiently visually
reflect inhibitor state changes to the user (or trigger any other
desired action).

Since the surface implemenation might already have been destroyed when
the keyboard shortcuts inhibitor destruction handler is called, we need
to defer criteria execution via the event loop and then go looking
whether a matching surface still exists and derive the view to execute
the criteria on from that.

Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
This commit is contained in:
Michael Weiser 2020-03-18 22:14:37 +01:00
parent 224576afcc
commit 0889c1816e
6 changed files with 89 additions and 7 deletions

View file

@ -343,4 +343,7 @@ void view_save_buffer(struct sway_view *view);
bool view_is_transient_for(struct sway_view *child, struct sway_view *ancestor);
void view_schedule_criteria_execution_from_wlr_surface(
struct wlr_surface *wlr_surface);
#endif