summaryrefslogtreecommitdiff
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c39
1 files changed, 15 insertions, 24 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index d48ddef3..d649100f 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -160,12 +160,12 @@ void output_view_for_each_surface(struct sway_output *output,
.user_iterator = iterator,
.user_data = user_data,
.output = output,
- .ox = view->container->current.view_x - output->wlr_output->lx
+ .ox = view->container->current.content_x - output->wlr_output->lx
- view->geometry.x,
- .oy = view->container->current.view_y - output->wlr_output->ly
+ .oy = view->container->current.content_y - output->wlr_output->ly
- view->geometry.y,
- .width = view->container->current.view_width,
- .height = view->container->current.view_height,
+ .width = view->container->current.content_width,
+ .height = view->container->current.content_height,
.rotation = 0, // TODO
};
@@ -179,12 +179,12 @@ void output_view_for_each_popup(struct sway_output *output,
.user_iterator = iterator,
.user_data = user_data,
.output = output,
- .ox = view->container->current.view_x - output->wlr_output->lx
+ .ox = view->container->current.content_x - output->wlr_output->lx
- view->geometry.x,
- .oy = view->container->current.view_y - output->wlr_output->ly
+ .oy = view->container->current.content_y - output->wlr_output->ly
- view->geometry.y,
- .width = view->container->current.view_width,
- .height = view->container->current.view_height,
+ .width = view->container->current.content_width,
+ .height = view->container->current.content_height,
.rotation = 0, // TODO
};
@@ -204,7 +204,7 @@ void output_layer_for_each_surface(struct sway_output *output,
}
}
-#ifdef HAVE_XWAYLAND
+#if HAVE_XWAYLAND
void output_unmanaged_for_each_surface(struct sway_output *output,
struct wl_list *unmanaged, sway_surface_iterator_func_t iterator,
void *user_data) {
@@ -274,7 +274,7 @@ static void output_for_each_surface(struct sway_output *output,
for_each_surface_container_iterator(floater, &data);
}
}
-#ifdef HAVE_XWAYLAND
+#if HAVE_XWAYLAND
output_unmanaged_for_each_surface(output, &root->xwayland_unmanaged,
iterator, user_data);
#endif
@@ -289,7 +289,7 @@ static void output_for_each_surface(struct sway_output *output,
workspace_for_each_container(workspace,
for_each_surface_container_iterator, &data);
-#ifdef HAVE_XWAYLAND
+#if HAVE_XWAYLAND
output_unmanaged_for_each_surface(output, &root->xwayland_unmanaged,
iterator, user_data);
#endif
@@ -469,23 +469,14 @@ void output_damage_box(struct sway_output *output, struct wlr_box *_box) {
wlr_output_damage_add_box(output->damage, &box);
}
-static void output_damage_whole_container_iterator(struct sway_container *con,
- void *data) {
- if (!sway_assert(con->view, "expected a view")) {
- return;
- }
- struct sway_output *output = data;
- output_damage_view(output, con->view, true);
-}
-
void output_damage_whole_container(struct sway_output *output,
struct sway_container *con) {
// Pad the box by 1px, because the width is a double and might be a fraction
struct wlr_box box = {
- .x = con->current.con_x - output->wlr_output->lx - 1,
- .y = con->current.con_y - output->wlr_output->ly - 1,
- .width = con->current.con_width + 2,
- .height = con->current.con_height + 2,
+ .x = con->current.x - output->wlr_output->lx - 1,
+ .y = con->current.y - output->wlr_output->ly - 1,
+ .width = con->current.width + 2,
+ .height = con->current.height + 2,
};
scale_box(&box, output->wlr_output->scale);
wlr_output_damage_add_box(output->damage, &box);