diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-16 22:41:10 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-18 10:39:38 +1000 |
commit | 982a2d0c99f4128a7cf2236ca190dd9b4e6d7828 (patch) | |
tree | 3106f8f05af455924abfadb2893e0c3599b465c9 /sway/desktop/output.c | |
parent | Add view_get_geometry (diff) | |
download | sway-982a2d0c99f4128a7cf2236ca190dd9b4e6d7828.tar.gz sway-982a2d0c99f4128a7cf2236ca190dd9b4e6d7828.tar.zst sway-982a2d0c99f4128a7cf2236ca190dd9b4e6d7828.zip |
Fix geometry
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 66747a3f..cb0b4a07 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -140,12 +140,16 @@ 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); | ||
143 | struct surface_iterator_data data = { | 145 | struct surface_iterator_data data = { |
144 | .user_iterator = iterator, | 146 | .user_iterator = iterator, |
145 | .user_data = user_data, | 147 | .user_data = user_data, |
146 | .output = output, | 148 | .output = output, |
147 | .ox = view->swayc->current.view_x - output->swayc->current.swayc_x, | 149 | .ox = view->swayc->current.view_x - output->swayc->current.swayc_x |
148 | .oy = view->swayc->current.view_y - output->swayc->current.swayc_y, | 150 | - geometry.x, |
151 | .oy = view->swayc->current.view_y - output->swayc->current.swayc_y | ||
152 | - geometry.y, | ||
149 | .width = view->swayc->current.view_width, | 153 | .width = view->swayc->current.view_width, |
150 | .height = view->swayc->current.view_height, | 154 | .height = view->swayc->current.view_height, |
151 | .rotation = 0, // TODO | 155 | .rotation = 0, // TODO |