format code

This commit is contained in:
DreamMaoMao 2025-11-08 12:41:38 +08:00
parent cd51cd9045
commit b05c02ccfb
4 changed files with 13 additions and 21 deletions

View file

@ -1460,11 +1460,11 @@ int toggleoverview(const Arg *arg) {
unsigned int visible_client_number = 0;
if (selmon->isoverview) {
wl_list_for_each(c, &clients,
link) if (c && c->mon == selmon &&
!client_is_unmanaged(c) &&
!client_is_x11_popup(c) &&
!c->isminied && !c->isunglobal) {
wl_list_for_each(c, &clients, link) if (c && c->mon == selmon &&
!client_is_unmanaged(c) &&
!client_is_x11_popup(c) &&
!c->isminied &&
!c->isunglobal) {
visible_client_number++;
}
if (visible_client_number > 0) {
@ -1494,8 +1494,7 @@ int toggleoverview(const Arg *arg) {
wl_list_for_each(c, &clients, link) {
if (c && c->mon == selmon && !c->iskilling &&
!client_is_unmanaged(c) && !c->isunglobal &&
!client_is_x11_popup(c) &&
client_surface(c)->mapped)
!client_is_x11_popup(c) && client_surface(c)->mapped)
overview_restore(c, &(Arg){.ui = target});
}
}

View file

@ -28,8 +28,7 @@ void grid(Monitor *m) {
? 0
: borderpx;
if (VISIBLEON(c, m) && !c->isunglobal &&
((m->isoverview && !client_is_x11_popup(c)) ||
ISTILED(c))) {
((m->isoverview && !client_is_x11_popup(c)) || ISTILED(c))) {
cw = (m->w.width - 2 * target_gappo) * single_width_ratio;
ch = (m->w.height - 2 * target_gappo) * single_height_ratio;
c->geom.x = m->w.x + (m->w.width - cw) / 2;
@ -55,8 +54,7 @@ void grid(Monitor *m) {
? 0
: borderpx;
if (VISIBLEON(c, m) && !c->isunglobal &&
((m->isoverview && !client_is_x11_popup(c)) ||
ISTILED(c))) {
((m->isoverview && !client_is_x11_popup(c)) || ISTILED(c))) {
if (i == 0) {
c->geom.x = m->w.x + target_gappo;
c->geom.y = m->w.y + (m->w.height - ch) / 2 + target_gappo;
@ -106,8 +104,7 @@ void grid(Monitor *m) {
? 0
: borderpx;
if (VISIBLEON(c, m) && !c->isunglobal &&
((m->isoverview && !client_is_x11_popup(c)) ||
ISTILED(c))) {
((m->isoverview && !client_is_x11_popup(c)) || ISTILED(c))) {
cx = m->w.x + (i % cols) * (cw + target_gappi);
cy = m->w.y + (i / cols) * (ch + target_gappi);
if (overcols && i >= n - overcols) {

View file

@ -317,8 +317,7 @@ void vertical_grid(Monitor *m) {
? 0
: borderpx;
if (VISIBLEON(c, m) && !c->isunglobal &&
((m->isoverview && !client_is_x11_popup(c)) ||
ISTILED(c))) {
((m->isoverview && !client_is_x11_popup(c)) || ISTILED(c))) {
ch = (m->w.height - 2 * target_gappo) * single_height_ratio;
cw = (m->w.width - 2 * target_gappo) * single_width_ratio;
c->geom.x = m->w.x + (m->w.width - cw) / 2;
@ -345,8 +344,7 @@ void vertical_grid(Monitor *m) {
? 0
: borderpx;
if (VISIBLEON(c, m) && !c->isunglobal &&
((m->isoverview && !client_is_x11_popup(c)) ||
ISTILED(c))) {
((m->isoverview && !client_is_x11_popup(c)) || ISTILED(c))) {
if (i == 0) {
c->geom.x = m->w.x + (m->w.width - cw) / 2 + target_gappo;
c->geom.y = m->w.y + target_gappo;
@ -392,8 +390,7 @@ void vertical_grid(Monitor *m) {
? 0
: borderpx;
if (VISIBLEON(c, m) && !c->isunglobal &&
((m->isoverview && !client_is_x11_popup(c)) ||
ISTILED(c))) {
((m->isoverview && !client_is_x11_popup(c)) || ISTILED(c))) {
cx = m->w.x + (i / rows) * (cw + target_gappi);
cy = m->w.y + (i % rows) * (ch + target_gappi);
if (overrows && i >= n - overrows) {

View file

@ -1313,8 +1313,7 @@ void applyrules(Client *c) {
// if no geom rule hit and is normal winodw, use the center pos and record
// the hit size
if (!hit_rule_pos &&
(!client_is_x11(c) || !client_is_x11_popup(c))) {
if (!hit_rule_pos && (!client_is_x11(c) || !client_is_x11_popup(c))) {
c->float_geom = c->geom = setclient_coordinate_center(c, c->geom, 0, 0);
}