mirror of
https://github.com/swaywm/sway.git
synced 2024-11-16 21:23:17 +00:00
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.
(cherry picked from commit 7ec9d07fc5
)
This commit is contained in:
parent
b51721901d
commit
ee4e4bb50f
|
@ -99,8 +99,8 @@ static bool get_surface_box(struct surface_iterator_data *data,
|
||||||
int sw = surface->current.width;
|
int sw = surface->current.width;
|
||||||
int sh = surface->current.height;
|
int sh = surface->current.height;
|
||||||
|
|
||||||
double _sx = sx + surface->sx;
|
double _sx = sx;
|
||||||
double _sy = sy + surface->sy;
|
double _sy = sy;
|
||||||
rotate_child_position(&_sx, &_sy, sw, sh, data->width, data->height,
|
rotate_child_position(&_sx, &_sy, sw, sh, data->width, data->height,
|
||||||
data->rotation);
|
data->rotation);
|
||||||
|
|
||||||
|
|
|
@ -162,8 +162,8 @@ static void render_surface_iterator(struct sway_output *output, struct sway_view
|
||||||
struct wlr_box dst_box = *_box;
|
struct wlr_box dst_box = *_box;
|
||||||
struct sway_container *container = data->container;
|
struct sway_container *container = data->container;
|
||||||
if (container != NULL) {
|
if (container != NULL) {
|
||||||
dst_box.width = fmin(dst_box.width, container->current.content_width - surface->sx);
|
dst_box.width = fmin(dst_box.width, container->current.content_width);
|
||||||
dst_box.height = fmin(dst_box.height, container->current.content_height - surface->sy);
|
dst_box.height = fmin(dst_box.height, container->current.content_height);
|
||||||
}
|
}
|
||||||
scale_box(&dst_box, wlr_output->scale);
|
scale_box(&dst_box, wlr_output->scale);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue