aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/xdg_shell.c
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2021-02-12 23:22:51 +0100
committerTudor Brindus <me@tbrindus.ca>2021-02-16 22:05:00 -0500
commita047b5ee4a2a67d30d93641ff86531d54b8e0879 (patch)
tree271666c6254e4fabf943c1153224059411a5ce56 /sway/desktop/xdg_shell.c
parent28cadf558090854ace1df1a0a64f5fbc059541c0 (diff)
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.c6
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) {
struct sway_view *view = popup->child.view;
struct wlr_xdg_popup *wlr_popup = popup->wlr_xdg_surface->popup;
- struct sway_output *output = view->container->workspace->output;
+ struct sway_output *output = view->container->pending.workspace->output;
// the output box expressed in the coordinate system of the toplevel parent
// of the popup
struct wlr_box output_toplevel_sx_box = {
- .x = output->lx - view->container->content_x,
- .y = output->ly - view->container->content_y,
+ .x = output->lx - view->container->pending.content_x,
+ .y = output->ly - view->container->pending.content_y,
.width = output->width,
.height = output->height,
};