diff options
author | Kenny Levinsen <kl@kl.wtf> | 2021-04-25 23:19:51 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-04-26 09:24:12 +0200 |
commit | 7ec9d07fc597c739760df5223469e9f15340db78 (patch) | |
tree | d1f9cef4bef49ba5afa687a09379c50d0d3dcf30 /sway/desktop/render.c | |
parent | tree/view: don't give focus to views mapped under fullscreen views (diff) | |
download | sway-7ec9d07fc597c739760df5223469e9f15340db78.tar.gz sway-7ec9d07fc597c739760df5223469e9f15340db78.tar.zst sway-7ec9d07fc597c739760df5223469e9f15340db78.zip |
Remove usage of surface->sx|sy
These coordinates contain the all-time accumulated buffer attach point,
which is a way to perform incremental client-side initiated movement of
windows, intended as a way to maintain logical window positioning while
compensating for layout changes such as folding in a left side panel.
This value is not useful for implementing this feature, and break things
if they ever become non-zero. Their inclusion in calculations also tend
to cause confusion.
Remove usage of these coordinates, removing the ability for clients to
move themselves. This may again be supported if a better API is made
available from wlroots.
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r-- | sway/desktop/render.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 56936d53..42d62b90 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c | |||
@@ -159,8 +159,8 @@ static void render_surface_iterator(struct sway_output *output, struct sway_view | |||
159 | struct wlr_box dst_box = *_box; | 159 | struct wlr_box dst_box = *_box; |
160 | struct sway_container *container = data->container; | 160 | struct sway_container *container = data->container; |
161 | if (container != NULL) { | 161 | if (container != NULL) { |
162 | dst_box.width = fmin(dst_box.width, container->current.content_width - surface->sx); | 162 | dst_box.width = fmin(dst_box.width, container->current.content_width); |
163 | dst_box.height = fmin(dst_box.height, container->current.content_height - surface->sy); | 163 | dst_box.height = fmin(dst_box.height, container->current.content_height); |
164 | } | 164 | } |
165 | scale_box(&dst_box, wlr_output->scale); | 165 | scale_box(&dst_box, wlr_output->scale); |
166 | 166 | ||