mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
fix: fullscrren client shouldn't be effect by other monitor
This commit is contained in:
parent
ca824a7fe8
commit
fdd30db0c7
3 changed files with 30 additions and 8 deletions
|
|
@ -140,6 +140,10 @@ void grid(Monitor *m) {
|
|||
|
||||
if (n == 1) {
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
|
||||
if (c->mon != m)
|
||||
continue;
|
||||
|
||||
c->bw = m->visible_tiling_clients == 1 && no_border_when_single &&
|
||||
smartgaps
|
||||
? 0
|
||||
|
|
@ -164,6 +168,9 @@ void grid(Monitor *m) {
|
|||
ch = (m->w.height - 2 * overviewgappo) * 0.65;
|
||||
i = 0;
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c->mon != m)
|
||||
continue;
|
||||
|
||||
c->bw = m->visible_tiling_clients == 1 && no_border_when_single &&
|
||||
smartgaps
|
||||
? 0
|
||||
|
|
@ -212,6 +219,9 @@ void grid(Monitor *m) {
|
|||
// 调整每个客户端的位置和大小
|
||||
i = 0;
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
|
||||
if (c->mon != m)
|
||||
continue;
|
||||
c->bw =
|
||||
m->visible_tiling_clients == 1 && no_border_when_single && smartgaps
|
||||
? 0
|
||||
|
|
|
|||
|
|
@ -138,6 +138,10 @@ void vertical_grid(Monitor *m) {
|
|||
|
||||
if (n == 1) {
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
|
||||
if (c->mon != m)
|
||||
continue;
|
||||
|
||||
c->bw = m->visible_tiling_clients == 1 && no_border_when_single &&
|
||||
smartgaps
|
||||
? 0
|
||||
|
|
@ -162,6 +166,10 @@ void vertical_grid(Monitor *m) {
|
|||
cw = (m->w.width - 2 * overviewgappo) * 0.65;
|
||||
i = 0;
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
|
||||
if (c->mon != m)
|
||||
continue;
|
||||
|
||||
c->bw = m->visible_tiling_clients == 1 && no_border_when_single &&
|
||||
smartgaps
|
||||
? 0
|
||||
|
|
@ -207,6 +215,9 @@ void vertical_grid(Monitor *m) {
|
|||
|
||||
i = 0;
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c->mon != m)
|
||||
continue;
|
||||
|
||||
c->bw =
|
||||
m->visible_tiling_clients == 1 && no_border_when_single && smartgaps
|
||||
? 0
|
||||
|
|
|
|||
17
src/mango.c
17
src/mango.c
|
|
@ -1245,7 +1245,8 @@ void applyrules(Client *c) {
|
|||
*/
|
||||
wl_list_for_each(fc, &clients,
|
||||
link) if (fc && fc != c && c->tags & fc->tags &&
|
||||
ISFULLSCREEN(fc) && !c->isfloating) {
|
||||
VISIBLEON(fc, c->mon) && ISFULLSCREEN(fc) &&
|
||||
!c->isfloating) {
|
||||
clear_fullscreen_flag(fc);
|
||||
arrange(c->mon, false);
|
||||
}
|
||||
|
|
@ -4306,9 +4307,9 @@ setfloating(Client *c, int floating) {
|
|||
c->is_in_scratchpad = 0;
|
||||
c->isnamedscratchpad = 0;
|
||||
// 让当前tag中的全屏窗口退出全屏参与平铺
|
||||
wl_list_for_each(fc, &clients, link) if (fc && fc != c &&
|
||||
c->tags & fc->tags &&
|
||||
ISFULLSCREEN(fc)) {
|
||||
wl_list_for_each(fc, &clients,
|
||||
link) if (fc && fc != c && VISIBLEON(fc, c->mon) &&
|
||||
c->tags & fc->tags && ISFULLSCREEN(fc)) {
|
||||
clear_fullscreen_flag(fc);
|
||||
}
|
||||
}
|
||||
|
|
@ -5064,15 +5065,15 @@ void toggleoverview(const Arg *arg) {
|
|||
// overview到正常视图,还原之前退出的浮动和全屏窗口状态
|
||||
if (selmon->isoverview) {
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c && !client_is_unmanaged(c) &&
|
||||
if (c && c->mon == selmon && !client_is_unmanaged(c) &&
|
||||
!client_should_ignore_focus(c) && !c->isunglobal)
|
||||
overview_backup(c);
|
||||
}
|
||||
} else {
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c && !c->iskilling && !client_is_unmanaged(c) &&
|
||||
!c->isunglobal && !client_should_ignore_focus(c) &&
|
||||
client_surface(c)->mapped)
|
||||
if (c && c->mon == selmon && !c->iskilling &&
|
||||
!client_is_unmanaged(c) && !c->isunglobal &&
|
||||
!client_should_ignore_focus(c) && client_surface(c)->mapped)
|
||||
overview_restore(c, &(Arg){.ui = target});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue