aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-11-17 18:32:03 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-11-17 21:29:42 +1000
commitbe9348d25c9556bdabb83d964a8761f920fc4a11 (patch)
treec06bde3d10e9bfea04acdd9b055cd596f13d4522 /sway/desktop/output.c
parentMerge pull request #3132 from emersion/dispatch-cursor-btn-segfault (diff)
downloadsway-be9348d25c9556bdabb83d964a8761f920fc4a11.tar.gz
sway-be9348d25c9556bdabb83d964a8761f920fc4a11.tar.zst
sway-be9348d25c9556bdabb83d964a8761f920fc4a11.zip
Move view {x,y,width,height} into container struct
This renames/moves the following properties: * sway_view.{x,y,width,height} -> sway_container.content_{x,y,width,height} * This is required to support placeholder containers as they don't have a view. * sway_container_state.view_{x,y,width,height} -> sway_container_state.content_{x,y,width,height} * To remain consistent with the above. * sway_container_state.con_{x,y,width,height} -> sway_container_state.{x,y,width,height} * The con prefix was there to give it contrast from the view properties, and is no longer useful. The function container_set_geometry_from_floating_view has also been renamed to container_set_geometry_from_content.
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index c53a9c73..e8112bd9 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,
160 .user_iterator = iterator, 160 .user_iterator = iterator,
161 .user_data = user_data, 161 .user_data = user_data,
162 .output = output, 162 .output = output,
163 .ox = view->container->current.view_x - output->wlr_output->lx 163 .ox = view->container->current.content_x - output->wlr_output->lx
164 - view->geometry.x, 164 - view->geometry.x,
165 .oy = view->container->current.view_y - output->wlr_output->ly 165 .oy = view->container->current.content_y - output->wlr_output->ly
166 - view->geometry.y, 166 - view->geometry.y,
167 .width = view->container->current.view_width, 167 .width = view->container->current.content_width,
168 .height = view->container->current.view_height, 168 .height = view->container->current.content_height,
169 .rotation = 0, // TODO 169 .rotation = 0, // TODO
170 }; 170 };
171 171
@@ -179,12 +179,12 @@ void output_view_for_each_popup(struct sway_output *output,
179 .user_iterator = iterator, 179 .user_iterator = iterator,
180 .user_data = user_data, 180 .user_data = user_data,
181 .output = output, 181 .output = output,
182 .ox = view->container->current.view_x - output->wlr_output->lx 182 .ox = view->container->current.content_x - output->wlr_output->lx
183 - view->geometry.x, 183 - view->geometry.x,
184 .oy = view->container->current.view_y - output->wlr_output->ly 184 .oy = view->container->current.content_y - output->wlr_output->ly
185 - view->geometry.y, 185 - view->geometry.y,
186 .width = view->container->current.view_width, 186 .width = view->container->current.content_width,
187 .height = view->container->current.view_height, 187 .height = view->container->current.content_height,
188 .rotation = 0, // TODO 188 .rotation = 0, // TODO
189 }; 189 };
190 190
@@ -473,10 +473,10 @@ void output_damage_whole_container(struct sway_output *output,
473 struct sway_container *con) { 473 struct sway_container *con) {
474 // Pad the box by 1px, because the width is a double and might be a fraction 474 // Pad the box by 1px, because the width is a double and might be a fraction
475 struct wlr_box box = { 475 struct wlr_box box = {
476 .x = con->current.con_x - output->wlr_output->lx - 1, 476 .x = con->current.x - output->wlr_output->lx - 1,
477 .y = con->current.con_y - output->wlr_output->ly - 1, 477 .y = con->current.y - output->wlr_output->ly - 1,
478 .width = con->current.con_width + 2, 478 .width = con->current.width + 2,
479 .height = con->current.con_height + 2, 479 .height = con->current.height + 2,
480 }; 480 };
481 scale_box(&box, output->wlr_output->scale); 481 scale_box(&box, output->wlr_output->scale);
482 wlr_output_damage_add_box(output->damage, &box); 482 wlr_output_damage_add_box(output->damage, &box);