diff options
author | Kenny Levinsen <kl@kl.wtf> | 2021-02-12 23:22:51 +0100 |
---|---|---|
committer | Tudor Brindus <me@tbrindus.ca> | 2021-02-16 22:05:00 -0500 |
commit | a047b5ee4a2a67d30d93641ff86531d54b8e0879 (patch) | |
tree | 271666c6254e4fabf943c1153224059411a5ce56 /sway/criteria.c | |
parent | Add missing transaction commits to seatop_default (diff) | |
download | sway-a047b5ee4a2a67d30d93641ff86531d54b8e0879.tar.gz sway-a047b5ee4a2a67d30d93641ff86531d54b8e0879.tar.zst sway-a047b5ee4a2a67d30d93641ff86531d54b8e0879.zip |
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.
Diffstat (limited to 'sway/criteria.c')
-rw-r--r-- | sway/criteria.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/criteria.c b/sway/criteria.c index 409160c5..d2a5566f 100644 --- a/sway/criteria.c +++ b/sway/criteria.c | |||
@@ -351,7 +351,7 @@ static bool criteria_matches_view(struct criteria *criteria, | |||
351 | } | 351 | } |
352 | 352 | ||
353 | if (criteria->workspace) { | 353 | if (criteria->workspace) { |
354 | struct sway_workspace *ws = view->container->workspace; | 354 | struct sway_workspace *ws = view->container->pending.workspace; |
355 | if (!ws) { | 355 | if (!ws) { |
356 | return false; | 356 | return false; |
357 | } | 357 | } |
@@ -359,7 +359,7 @@ static bool criteria_matches_view(struct criteria *criteria, | |||
359 | switch (criteria->workspace->match_type) { | 359 | switch (criteria->workspace->match_type) { |
360 | case PATTERN_FOCUSED: | 360 | case PATTERN_FOCUSED: |
361 | if (focused && | 361 | if (focused && |
362 | strcmp(ws->name, focused->container->workspace->name)) { | 362 | strcmp(ws->name, focused->container->pending.workspace->name)) { |
363 | return false; | 363 | return false; |
364 | } | 364 | } |
365 | break; | 365 | break; |