aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorRyan Dwyer <RyanDwyer@users.noreply.github.com>2018-08-19 16:07:11 +1000
committerGitHub <noreply@github.com>2018-08-19 16:07:11 +1000
commit7f22fab3895ff090d5e26936f4e964e081090164 (patch)
treec5d96041e3270b1d1d50f8a42d91652d615c9938 /sway/tree/container.c
parent37e37627cae0a23d9f763cc56378b528f2ff3885 (diff)
parentd0a24465d75cc7197ee253e1de9fa961071cd034 (diff)
Merge branch 'master' into commands
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 1ceae175..2a428ca5 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -509,8 +509,8 @@ static void surface_at_view(struct sway_container *swayc, double lx, double ly,
return;
}
struct sway_view *sview = swayc->sway_view;
- double view_sx = lx - sview->x;
- double view_sy = ly - sview->y;
+ double view_sx = lx - sview->x + sview->geometry.x;
+ double view_sy = ly - sview->y + sview->geometry.y;
double _sx, _sy;
struct wlr_surface *_surface = NULL;
@@ -737,10 +737,10 @@ void container_for_each_child(struct sway_container *container,
container->type == C_VIEW, "Expected a container or view")) {
return;
}
- f(container, data);
if (container->children) {
for (int i = 0; i < container->children->length; ++i) {
struct sway_container *child = container->children->items[i];
+ f(child, data);
container_for_each_child(child, f, data);
}
}
@@ -1065,6 +1065,7 @@ void container_set_geometry_from_floating_view(struct sway_container *con) {
con->y = view->y - top;
con->width = view->width + border_width * 2;
con->height = top + view->height + border_width;
+ container_set_dirty(con);
}
bool container_is_floating(struct sway_container *container) {