diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-18 15:10:06 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-18 15:10:06 +1000 |
commit | b0a5f3a25f52bc1d48d771cb02820042006d8d9e (patch) | |
tree | e7a2e4c60e562589e3b9a54c6ce559a41dcf7534 /sway/desktop/output.c | |
parent | Set current size when a floating xwayland view resizes (diff) | |
download | sway-b0a5f3a25f52bc1d48d771cb02820042006d8d9e.tar.gz sway-b0a5f3a25f52bc1d48d771cb02820042006d8d9e.tar.zst sway-b0a5f3a25f52bc1d48d771cb02820042006d8d9e.zip |
Store geometry in the view and handle any floating view resizing
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index cb0b4a07..b4564fac 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -140,23 +140,20 @@ void output_surface_for_each_surface(struct sway_output *output, | |||
140 | void output_view_for_each_surface(struct sway_output *output, | 140 | void output_view_for_each_surface(struct sway_output *output, |
141 | struct sway_view *view, sway_surface_iterator_func_t iterator, | 141 | struct sway_view *view, sway_surface_iterator_func_t iterator, |
142 | void *user_data) { | 142 | void *user_data) { |
143 | struct wlr_box geometry; | ||
144 | view_get_geometry(view, &geometry); | ||
145 | struct surface_iterator_data data = { | 143 | struct surface_iterator_data data = { |
146 | .user_iterator = iterator, | 144 | .user_iterator = iterator, |
147 | .user_data = user_data, | 145 | .user_data = user_data, |
148 | .output = output, | 146 | .output = output, |
149 | .ox = view->swayc->current.view_x - output->swayc->current.swayc_x | 147 | .ox = view->swayc->current.view_x - output->swayc->current.swayc_x |
150 | - geometry.x, | 148 | - view->geometry.x, |
151 | .oy = view->swayc->current.view_y - output->swayc->current.swayc_y | 149 | .oy = view->swayc->current.view_y - output->swayc->current.swayc_y |
152 | - geometry.y, | 150 | - view->geometry.y, |
153 | .width = view->swayc->current.view_width, | 151 | .width = view->swayc->current.view_width, |
154 | .height = view->swayc->current.view_height, | 152 | .height = view->swayc->current.view_height, |
155 | .rotation = 0, // TODO | 153 | .rotation = 0, // TODO |
156 | }; | 154 | }; |
157 | 155 | ||
158 | view_for_each_surface(view, | 156 | view_for_each_surface(view, output_for_each_surface_iterator, &data); |
159 | output_for_each_surface_iterator, &data); | ||
160 | } | 157 | } |
161 | 158 | ||
162 | void output_view_for_each_popup(struct sway_output *output, | 159 | void output_view_for_each_popup(struct sway_output *output, |