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
|
|
@ -37,6 +37,21 @@ void set_size_per(Monitor *m, Client *c) {
|
|||
}
|
||||
}
|
||||
|
||||
void monocle_set_focus(Client *c, bool focused) {
|
||||
|
||||
if (!c || !c->mon)
|
||||
return;
|
||||
|
||||
c->is_monocle_hide = !focused;
|
||||
mango_titlebar_node_set_focus(c->titlebar_node, focused);
|
||||
wlr_scene_node_set_enabled(&c->scene->node, focused);
|
||||
|
||||
if (!focused) {
|
||||
c->animation.current = c->animainit_geom = c->animation.initial =
|
||||
c->pending = c->current = c->geom;
|
||||
}
|
||||
}
|
||||
|
||||
void resize_tile_master_horizontal(Client *grabc, bool isdrag, int32_t offsetx,
|
||||
int32_t offsety, uint32_t time,
|
||||
int32_t type) {
|
||||
|
|
@ -1128,6 +1143,20 @@ void pre_caculate_before_arrange(Monitor *m, bool want_animation,
|
|||
set_size_per(m, c);
|
||||
}
|
||||
|
||||
if (m->is_jump_mode && !c->text_node) {
|
||||
client_add_text_node(c);
|
||||
}
|
||||
|
||||
if (m->pertag->ltidxs[m->pertag->curtag]->id == MONOCLE &&
|
||||
!c->titlebar_node) {
|
||||
client_add_titlebar_node(c);
|
||||
}
|
||||
|
||||
if (c->titlebar_node && c->mon == m) {
|
||||
wlr_scene_node_set_enabled(&c->titlebar_node->scene_buffer->node,
|
||||
false);
|
||||
}
|
||||
|
||||
if (c->mon == m && (c->isglobal || c->isunglobal)) {
|
||||
c->tags = m->tagset[m->seltags];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue