mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-04 07:15:55 -04:00
fix: should use floating window as next prev client
This commit is contained in:
parent
b00d5ad4bc
commit
53a02b8be2
1 changed files with 16 additions and 10 deletions
26
src/mango.c
26
src/mango.c
|
|
@ -3892,20 +3892,26 @@ void resize_tile_client(Client *grabc, unsigned int time) {
|
||||||
double refresh_interval = 1000000.0 / grabc->mon->wlr_output->refresh;
|
double refresh_interval = 1000000.0 / grabc->mon->wlr_output->refresh;
|
||||||
wlr_log(WLR_ERROR, "%f", refresh_interval);
|
wlr_log(WLR_ERROR, "%f", refresh_interval);
|
||||||
// 查找 grabc 在链表中的前一个和后一个客户端
|
// 查找 grabc 在链表中的前一个和后一个客户端
|
||||||
wl_list_for_each(tc, &clients, link) {
|
|
||||||
if (tc == grabc) {
|
struct wl_list *node;
|
||||||
// 找到当前客户端,下一个节点就是 next
|
|
||||||
if (tc->link.next != &clients) {
|
// 从当前节点的下一个开始遍历
|
||||||
next = wl_container_of(tc->link.next, next, link);
|
for (node = grabc->link.next; node != &clients; node = node->next) {
|
||||||
}
|
tc = wl_container_of(node, tc, link);
|
||||||
// 前一个节点就是 prev
|
if (!tc->isfloating) { // 根据你的实际字段名调整
|
||||||
if (tc->link.prev != &clients) {
|
next = tc;
|
||||||
prev = wl_container_of(tc->link.prev, prev, link);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 从当前节点的上一个开始遍历
|
||||||
|
for (node = grabc->link.prev; node != &clients; node = node->prev) {
|
||||||
|
tc = wl_container_of(node, tc, link);
|
||||||
|
if (!tc->isfloating) { // 根据你的实际字段名调整
|
||||||
|
prev = tc;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!start_drag_window) {
|
if (!start_drag_window) {
|
||||||
begin_cursorx = cursor->x;
|
begin_cursorx = cursor->x;
|
||||||
begin_cursory = cursor->y;
|
begin_cursory = cursor->y;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue