fix: stack client not allow cross monitor

This commit is contained in:
DreamMaoMao 2026-01-17 19:23:43 +08:00
parent 3ead4f37cd
commit db54b4eff4
2 changed files with 4 additions and 1 deletions

View file

@ -1604,7 +1604,7 @@ int32_t scroller_stack(const Arg *arg) {
target_client->isglobal || target_client->isunglobal))
return 0;
if (!target_client) {
if (!target_client || target_client->mon != c->mon) {
if (arg->i == LEFT || arg->i == UP) {
exit_scroller_stack(c);
wl_list_remove(&c->link);

View file

@ -4373,6 +4373,9 @@ void exchange_two_client(Client *c1, Client *c2, bool samemon) {
if (samemon && c1->mon != c2->mon)
return;
if(c1->mon != c2->mon && (c1->prev_in_stack || c2->prev_in_stack||c1->next_in_stack||c2->next_in_stack))
return;
// 交换布局参数
master_inner_per = c1->master_inner_per;
master_mfact_per = c1->master_mfact_per;