break change: remove tgmix layout

This commit is contained in:
DreamMaoMao 2026-05-09 22:07:21 +08:00
parent bb1443a063
commit 2d47728957
7 changed files with 6 additions and 30 deletions

View file

@ -558,7 +558,7 @@ bool client_is_in_same_stack(Client *sc, Client *tc, Client *fc) {
if (id != SCROLLER && id != VERTICAL_SCROLLER && id != TILE &&
id != VERTICAL_TILE && id != DECK && id != VERTICAL_DECK &&
id != CENTER_TILE && id != RIGHT_TILE && id != TGMIX)
id != CENTER_TILE && id != RIGHT_TILE)
return false;
if (id == SCROLLER || id == VERTICAL_SCROLLER) {
@ -583,15 +583,6 @@ bool client_is_in_same_stack(Client *sc, Client *tc, Client *fc) {
return true;
}
if (id == TGMIX) {
if (tc->ismaster ^ sc->ismaster)
return false;
if (fc && !(fc->ismaster ^ sc->ismaster))
return false;
if (!sc->ismaster && sc->mon->visible_tiling_clients <= 3)
return true;
}
if (id == CENTER_TILE) {
if (tc->ismaster ^ sc->ismaster)
return false;

View file

@ -707,8 +707,7 @@ void resize_tile_client(Client *grabc, bool isdrag, int32_t offsetx,
const Layout *current_layout =
grabc->mon->pertag->ltidxs[grabc->mon->pertag->curtag];
if (current_layout->id == TILE || current_layout->id == DECK ||
current_layout->id == CENTER_TILE || current_layout->id == RIGHT_TILE ||
(current_layout->id == TGMIX && grabc->mon->visible_tiling_clients <= 3)
current_layout->id == CENTER_TILE || current_layout->id == RIGHT_TILE
) {
resize_tile_master_horizontal(grabc, isdrag, offsetx, offsety, time,

View file

@ -993,15 +993,4 @@ monocle(Monitor *m) {
}
if ((c = focustop(m)))
wlr_scene_node_raise_to_top(&c->scene->node);
}
void tgmix(Monitor *m) {
int32_t n = m->visible_tiling_clients;
if (n <= 3) {
tile(m);
return;
} else {
grid(m);
return;
}
}
}

View file

@ -11,7 +11,6 @@ static void vertical_overview(Monitor *m);
static void vertical_grid(Monitor *m);
static void vertical_scroller(Monitor *m);
static void vertical_deck(Monitor *mon);
static void tgmix(Monitor *m);
static void dwindle(Monitor *m);
/* layout(s) */
@ -29,7 +28,6 @@ enum {
VERTICAL_GRID,
VERTICAL_DECK,
RIGHT_TILE,
TGMIX,
DWINDLE,
};
@ -48,6 +46,5 @@ Layout layouts[] = {
{"VT", vertical_tile, "vertical_tile", VERTICAL_TILE}, // 垂直平铺布局
{"VG", vertical_grid, "vertical_grid", VERTICAL_GRID}, // 垂直格子布局
{"VK", vertical_deck, "vertical_deck", VERTICAL_DECK}, // 垂直卡片布局
{"TG", tgmix, "tgmix", TGMIX}, // 混合布局
{"DW", dwindle, "dwindle", DWINDLE},
};