format code

This commit is contained in:
DreamMaoMao 2025-05-31 13:18:18 +08:00
parent cc8808d492
commit 54974d498b
3 changed files with 171 additions and 126 deletions

View file

@ -137,8 +137,9 @@ void grid(Monitor *m) {
// 第一次遍历,计算 n 的值
wl_list_for_each(c, &clients, link) {
if (VISIBLEON(c, c->mon) && (m->isoverview || ISTILED(c)) && !client_should_ignore_focus(c) && !c->iskilling && !c->animation.tagouting &&
c->mon == selmon) {
if (VISIBLEON(c, c->mon) && (m->isoverview || ISTILED(c)) &&
!client_should_ignore_focus(c) && !c->iskilling &&
!c->animation.tagouting && c->mon == selmon) {
n++;
}
}
@ -152,8 +153,9 @@ void grid(Monitor *m) {
c->bw = m->visible_clients == 1 && no_border_when_single && smartgaps
? 0
: borderpx;
if (VISIBLEON(c, c->mon) && (m->isoverview || ISTILED(c)) && !client_should_ignore_focus(c) && !c->iskilling && !c->animation.tagouting &&
c->mon == selmon) {
if (VISIBLEON(c, c->mon) && (m->isoverview || ISTILED(c)) &&
!client_should_ignore_focus(c) && !c->iskilling &&
!c->animation.tagouting && c->mon == selmon) {
cw = (m->w.width - 2 * overviewgappo) * 0.7;
ch = (m->w.height - 2 * overviewgappo) * 0.8;
c->geom.x = m->w.x + (m->w.width - cw) / 2;
@ -174,8 +176,9 @@ void grid(Monitor *m) {
c->bw = m->visible_clients == 1 && no_border_when_single && smartgaps
? 0
: borderpx;
if (VISIBLEON(c, c->mon) && (m->isoverview || ISTILED(c)) && !client_should_ignore_focus(c) && !c->iskilling && !c->animation.tagouting &&
c->mon == selmon) {
if (VISIBLEON(c, c->mon) && (m->isoverview || ISTILED(c)) &&
!client_should_ignore_focus(c) && !c->iskilling &&
!c->animation.tagouting && c->mon == selmon) {
if (i == 0) {
c->geom.x = m->w.x + overviewgappo;
c->geom.y = m->w.y + (m->w.height - ch) / 2 + overviewgappo;
@ -220,8 +223,9 @@ void grid(Monitor *m) {
c->bw = m->visible_clients == 1 && no_border_when_single && smartgaps
? 0
: borderpx;
if (VISIBLEON(c, c->mon) && (m->isoverview || ISTILED(c)) && !client_should_ignore_focus(c) && !c->iskilling && !c->animation.tagouting &&
c->mon == selmon) {
if (VISIBLEON(c, c->mon) && (m->isoverview || ISTILED(c)) &&
!client_should_ignore_focus(c) && !c->iskilling &&
!c->animation.tagouting && c->mon == selmon) {
cx = m->w.x + (i % cols) * (cw + overviewgappi);
cy = m->w.y + (i / cols) * (ch + overviewgappi);
if (overcols && i >= n - overcols) {