mirror of
https://github.com/labwc/labwc.git
synced 2025-11-01 22:58:47 -04:00
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:
parent
4b0ac0234c
commit
6441bd58f3
2 changed files with 10 additions and 6 deletions
12
src/view.c
12
src/view.c
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue