feat: scroller exchange windows naturally

This commit is contained in:
Andrej Novikov 2025-12-14 17:41:10 +02:00
parent acb3fc2a2a
commit 8cc811b198
No known key found for this signature in database
GPG key ID: 0B3D7DD3D63C5E4C

View file

@ -4378,6 +4378,12 @@ void exchange_two_client(Client *c1, Client *c2) {
arrange(c2->mon, false); arrange(c2->mon, false);
focusclient(c1, 0); focusclient(c1, 0);
} else { } else {
// For scroller layouts, swap geometry to maintain visual positions
if (is_scroller_layout(c1->mon)) {
struct wlr_box tmp_geom = c1->geom;
c1->geom = c2->geom;
c2->geom = tmp_geom;
}
arrange(c1->mon, false); arrange(c1->mon, false);
focusclient(c1, 0); focusclient(c1, 0);
} }