mirror of
https://github.com/swaywm/sway.git
synced 2026-02-15 22:05:38 -05:00
fix(criteria): allow con_id to match workspaces
The [con_id=X] criteria selector was failing to match workspace nodes because criteria_get_containers() only iterated through containers, not workspaces. This broke scripts that rely on marking workspaces by their internal ID (a pattern that works in i3). Rename criteria_get_containers to criteria_get_nodes and extend it to also iterate over workspaces when con_id is specified. Workspaces only support con_id matching (not con_mark, since they don't have marks). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
dbe8640035
commit
e7bd3f14e5
3 changed files with 30 additions and 15 deletions
|
|
@ -84,8 +84,9 @@ struct criteria *criteria_parse(char *raw, char **error);
|
|||
list_t *criteria_for_view(struct sway_view *view, enum criteria_type types);
|
||||
|
||||
/**
|
||||
* Compile a list of containers matching the given criteria.
|
||||
* Compile a list of nodes matching the given criteria.
|
||||
* Returns a list of struct sway_node *.
|
||||
*/
|
||||
list_t *criteria_get_containers(struct criteria *criteria);
|
||||
list_t *criteria_get_nodes(struct criteria *criteria);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue