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/desktop/xdg_shell.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/desktop/xdg_shell.c')
-rw-r--r-- | sway/desktop/xdg_shell.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 14880dcd..4c13f91f 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -70,13 +70,13 @@ static void popup_unconstrain(struct sway_xdg_popup *popup) { | |||
70 | struct sway_view *view = popup->child.view; | 70 | struct sway_view *view = popup->child.view; |
71 | struct wlr_xdg_popup *wlr_popup = popup->wlr_xdg_surface->popup; | 71 | struct wlr_xdg_popup *wlr_popup = popup->wlr_xdg_surface->popup; |
72 | 72 | ||
73 | struct sway_output *output = view->container->workspace->output; | 73 | struct sway_output *output = view->container->pending.workspace->output; |
74 | 74 | ||
75 | // the output box expressed in the coordinate system of the toplevel parent | 75 | // the output box expressed in the coordinate system of the toplevel parent |
76 | // of the popup | 76 | // of the popup |
77 | struct wlr_box output_toplevel_sx_box = { | 77 | struct wlr_box output_toplevel_sx_box = { |
78 | .x = output->lx - view->container->content_x, | 78 | .x = output->lx - view->container->pending.content_x, |
79 | .y = output->ly - view->container->content_y, | 79 | .y = output->ly - view->container->pending.content_y, |
80 | .width = output->width, | 80 | .width = output->width, |
81 | .height = output->height, | 81 | .height = output->height, |
82 | }; | 82 | }; |