view: don't use bitset for VIEW_EDGE_ALL

We will use bitset for views snapped to corner (e.g. top-left = TOP|LEFT)
This commit is contained in:
tokyo4j 2025-08-02 21:11:12 +09:00 committed by Johan Malm
parent 4b0ac0234c
commit 6441bd58f3
2 changed files with 10 additions and 6 deletions

View file

@ -169,8 +169,14 @@ view_matches_query(struct view *view, struct view_query *query)
return false;
}
if (query->tiled != VIEW_EDGE_INVALID && !(query->tiled & view->tiled)) {
return false;
if (query->tiled == VIEW_EDGE_ANY) {
if (!view->tiled) {
return false;
}
} else if (query->tiled != VIEW_EDGE_INVALID) {
if (query->tiled != view->tiled) {
return false;
}
}
const char *tiled_region =
@ -2136,7 +2142,7 @@ view_edge_parse(const char *direction, bool tiled, bool any)
if (any) {
if (!strcasecmp(direction, "any")) {
return VIEW_EDGE_ALL;
return VIEW_EDGE_ANY;
}
}