mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-04 06:46:38 -04:00
feat: scroller exchange windows naturally
This commit is contained in:
parent
acb3fc2a2a
commit
8cc811b198
1 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue