mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-19 14:33:16 -04:00
feat: monocle layout support title tab
This commit is contained in:
parent
5652066c68
commit
5a60f39064
12 changed files with 843 additions and 133 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue