mirror of
https://github.com/swaywm/sway.git
synced 2025-11-24 06:59:51 -05:00
container: Move pending state to state struct
Pending state is currently inlined directly in the container struct, while the current state is in a state struct. A side-effect of this is that it is not immediately obvious that pending double-buffered state is accessed, nor is it obvious what state is double-buffered. Instead, use the state struct for both current and pending.
This commit is contained in:
parent
28cadf5580
commit
a047b5ee4a
33 changed files with 723 additions and 757 deletions
|
|
@ -351,7 +351,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
}
|
||||
|
||||
if (criteria->workspace) {
|
||||
struct sway_workspace *ws = view->container->workspace;
|
||||
struct sway_workspace *ws = view->container->pending.workspace;
|
||||
if (!ws) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -359,7 +359,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
switch (criteria->workspace->match_type) {
|
||||
case PATTERN_FOCUSED:
|
||||
if (focused &&
|
||||
strcmp(ws->name, focused->container->workspace->name)) {
|
||||
strcmp(ws->name, focused->container->pending.workspace->name)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue