sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 771ad7bffafdb9fc06aa81f8fc1f33c05f1026d2
parent 08a69f267a96a5b0591222ef1d0f40208e46d484
Author: Ryan Dwyer <ryandwyer1@gmail.com>
Date:   Mon, 20 Aug 2018 13:24:57 +1000

Fix jumping views

Fixes #2490.

To be honest I'm not sure why this fixes the issue.

I observed that I could only make the view jump if I resized it to the
smallest possible size first. Then I had a suspicion that we were
accidentally factoring in the title and border sizes into the view size
when it uses CSD. So I changed that and it appears to have fixed the
jumping issue.

I guess when we factor the title and borders in, we send a configure to
the surface with a size smaller than the minimum, and it comes back with
a surface at the minimum size. We interpret this as an unexpected
resize, and this somehow makes it jump.

Diffstat:
Msway/tree/view.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sway/tree/view.c b/sway/tree/view.c @@ -236,7 +236,12 @@ void view_autoconfigure(struct sway_view *view) { view->border_top = false; } - switch (view->border) { + enum sway_container_border border = view->border; + if (view->using_csd) { + border = B_NONE; + } + + switch (border) { case B_NONE: x = con->x; y = con->y + y_offset;