feat: monocle layout support title tab

This commit is contained in:
DreamMaoMao 2026-06-17 10:22:37 +08:00
parent 5652066c68
commit 5a60f39064
12 changed files with 843 additions and 133 deletions

View file

@ -398,6 +398,16 @@ void client_draw_shadow(Client *c) {
wlr_scene_shadow_set_clipped_region(c->shadow, clipped_region);
}
void global_draw_titlebar(Client *c, int32_t x, int32_t y, int32_t width,
int32_t height) {
if (!c->titlebar_node)
return;
wlr_scene_node_set_position(&c->titlebar_node->scene_buffer->node, x, y);
wlr_scene_node_set_enabled(&c->titlebar_node->scene_buffer->node, true);
mango_titlebar_node_set_size(c->titlebar_node, width, height);
}
void apply_split_border(Client *c, bool hit_no_border) {
if (c->iskilling || !c->mon || !client_surface(c)->mapped)
@ -656,8 +666,10 @@ struct ivec2 clip_to_hide(Client *c, struct wlr_box *clip_box) {
(ISSCROLLTILED(c) || c->animation.tagouting || c->animation.tagining)) {
c->is_clip_to_hide = true;
wlr_scene_node_set_enabled(&c->scene->node, false);
} else if (c->is_clip_to_hide && VISIBLEON(c, c->mon)) {
} else if (c->is_clip_to_hide && VISIBLEON(c, c->mon) &&
(!c->is_monocle_hide || !is_monocle_layout(c->mon))) {
c->is_clip_to_hide = false;
c->is_monocle_hide = false;
wlr_scene_node_set_enabled(&c->scene->node, true);
}

View file

@ -45,8 +45,10 @@ void set_tagin_animation(Monitor *m, Client *c) {
void set_arrange_visible(Monitor *m, Client *c, bool want_animation) {
if (!c->is_clip_to_hide || !ISTILED(c) || !is_scroller_layout(c->mon)) {
if (!ISTILED(c) || ((!c->is_clip_to_hide || !is_scroller_layout(c->mon)) &&
(!c->is_monocle_hide || !is_monocle_layout(c->mon)))) {
c->is_clip_to_hide = false;
c->is_monocle_hide = false;
wlr_scene_node_set_enabled(&c->scene->node, true);
wlr_scene_node_set_enabled(&c->scene_surface->node, true);
}