This commit is contained in:
danieldg 2022-10-08 12:31:20 +02:00 committed by GitHub
commit 7e409511d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 36 additions and 21 deletions

View file

@ -35,6 +35,7 @@ struct criteria {
struct pattern *shell;
struct pattern *app_id;
struct pattern *con_mark;
char *trigger; // event that triggered this criteria match
uint32_t con_id; // internal ID
#if HAVE_XWAYLAND
struct pattern *class;
@ -72,11 +73,11 @@ struct criteria *criteria_parse(char *raw, char **error);
*
* Criteria types can be bitwise ORed.
*/
list_t *criteria_for_view(struct sway_view *view, enum criteria_type types);
list_t *criteria_for_view(struct sway_view *view, enum criteria_type types, const char* trigger);
/**
* Compile a list of containers matching the given criteria.
*/
list_t *criteria_get_containers(struct criteria *criteria);
list_t *criteria_get_containers(struct criteria *criteria, const char* trigger);
#endif

View file

@ -354,7 +354,7 @@ void view_update_title(struct sway_view *view, bool force);
* Run any criteria that match the view and haven't been run on this view
* before.
*/
void view_execute_criteria(struct sway_view *view);
void view_execute_criteria(struct sway_view *view, const char* trigger);
/**
* Returns true if there's a possibility the view may be rendered on screen.