mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-25 13:14:13 -04:00
feat: support group
feat: add dispatch groupleave opt: optimize layer cover fix: miss set client isgroupfocusing to false when it no group member fix: fix miss hide bar node when disable animaitons opt: allow floating window show group bar opt: optimize layer cover when setfloating opt: optimize size per set when setfloating opt: optimize layer cover of floating group bar opt: make groupbar same layer with its client opt: optimize groupbar animation clip fix: fix cant focus group membar when change mon opt: optimize shadow and border drap when floating cross monitor opt: optimize overlay layer set for group fix: fix xytonode not exclue snapbuffer for client opt: optmize structruing\ opt: add common for struct type It must be placed first; otherwise, after the xytonode's null pointer is forcibly converted, the reading type will encounter an incorrect address fix: capture windows with subsurfaces
This commit is contained in:
parent
722f6ab7bb
commit
1f9dbe7c3c
20 changed files with 863 additions and 456 deletions
|
|
@ -2,6 +2,8 @@ int32_t minimized(const Arg *arg);
|
|||
int32_t restore_minimized(const Arg *arg);
|
||||
int32_t toggle_scratchpad(const Arg *arg);
|
||||
int32_t focusdir(const Arg *arg);
|
||||
int32_t groupjoin(const Arg *arg);
|
||||
int32_t groupleave(const Arg *arg);
|
||||
int32_t toggleoverview(const Arg *arg);
|
||||
int32_t togglejump(const Arg *arg);
|
||||
int32_t set_proportion(const Arg *arg);
|
||||
|
|
@ -38,6 +40,7 @@ int32_t toggleglobal(const Arg *arg);
|
|||
int32_t incnmaster(const Arg *arg);
|
||||
int32_t focusmon(const Arg *arg);
|
||||
int32_t focusstack(const Arg *arg);
|
||||
int32_t groupfocus(const Arg *arg);
|
||||
int32_t chvt(const Arg *arg);
|
||||
int32_t reload_config(const Arg *arg);
|
||||
int32_t smartmovewin(const Arg *arg);
|
||||
|
|
|
|||
|
|
@ -157,6 +157,86 @@ int32_t focusdir(const Arg *arg) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int32_t groupjoin(const Arg *arg) {
|
||||
|
||||
if (!selmon)
|
||||
return 0;
|
||||
|
||||
Client *need_join_client = arg->tc ? arg->tc : selmon->sel;
|
||||
if (!need_join_client)
|
||||
return 0;
|
||||
|
||||
if (need_join_client->group_next || need_join_client->group_prev) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Client *need_replace_client = NULL;
|
||||
need_replace_client = direction_select(arg);
|
||||
|
||||
if (!need_replace_client ||
|
||||
need_replace_client->mon != need_join_client->mon)
|
||||
return 0;
|
||||
|
||||
if (!need_join_client->group_next && !need_join_client->group_prev) {
|
||||
|
||||
if (!need_replace_client->group_prev &&
|
||||
!need_replace_client->group_next) {
|
||||
need_replace_client->isgroupfocusing = true;
|
||||
}
|
||||
|
||||
need_join_client->group_next = need_replace_client;
|
||||
if (need_replace_client->group_prev) {
|
||||
need_replace_client->group_prev->group_next = need_join_client;
|
||||
}
|
||||
need_join_client->group_prev = need_replace_client->group_prev;
|
||||
need_replace_client->group_prev = need_join_client;
|
||||
|
||||
client_focus_group_member(need_join_client);
|
||||
arrange(need_join_client->mon, false, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t groupleave(const Arg *arg) {
|
||||
|
||||
if (!selmon)
|
||||
return 0;
|
||||
Client *tc = arg->tc ? arg->tc : selmon->sel;
|
||||
if (!tc || !tc->isgroupfocusing)
|
||||
return 0;
|
||||
if (!tc->group_next && !tc->group_prev) {
|
||||
return 0;
|
||||
}
|
||||
Client *rc = tc->group_next ? tc->group_next : tc->group_prev;
|
||||
|
||||
client_focus_group_member(rc);
|
||||
|
||||
if (tc->group_prev) {
|
||||
tc->group_prev->group_next = tc->group_next;
|
||||
}
|
||||
|
||||
if (tc->group_next) {
|
||||
tc->group_next->group_prev = tc->group_prev;
|
||||
}
|
||||
|
||||
tc->group_prev = NULL;
|
||||
tc->group_next = NULL;
|
||||
tc->isgroupfocusing = false;
|
||||
|
||||
wl_list_insert(&rc->link, &tc->link);
|
||||
wl_list_insert(&rc->flink, &tc->flink);
|
||||
|
||||
if (!rc->group_prev && !rc->group_next) {
|
||||
rc->isgroupfocusing = false;
|
||||
}
|
||||
|
||||
arrange(tc->mon, false, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t focuslast(const Arg *arg) {
|
||||
Client *c = NULL;
|
||||
Client *tc = NULL;
|
||||
|
|
@ -262,6 +342,31 @@ int32_t focusstack(const Arg *arg) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int32_t groupfocus(const Arg *arg) {
|
||||
Client *c = arg->tc ? arg->tc : selmon->sel;
|
||||
if (!c)
|
||||
return 0;
|
||||
|
||||
if (!c->group_prev && !c->group_next) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Client *tc = NULL;
|
||||
|
||||
if (arg->i == NEXT) {
|
||||
tc = c->group_next;
|
||||
} else {
|
||||
tc = c->group_prev;
|
||||
}
|
||||
|
||||
if (!tc)
|
||||
return 0;
|
||||
|
||||
client_focus_group_member(tc);
|
||||
arrange(tc->mon, false, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t incnmaster(const Arg *arg) {
|
||||
if (!arg || !selmon)
|
||||
return 0;
|
||||
|
|
@ -367,7 +472,7 @@ int32_t moveresize(const Arg *arg) {
|
|||
|
||||
if (cursor_mode != CurNormal && cursor_mode != CurPressed)
|
||||
return 0;
|
||||
xytonode(cursor->x, cursor->y, NULL, &grabc, NULL, NULL, NULL);
|
||||
xytonode(cursor->x, cursor->y, NULL, &grabc, NULL, NULL, NULL, NULL);
|
||||
if (!grabc || client_is_unmanaged(grabc) || grabc->isfullscreen ||
|
||||
grabc->ismaximizescreen) {
|
||||
grabc = NULL;
|
||||
|
|
@ -1437,6 +1542,8 @@ int32_t toggleoverlay(const Arg *arg) {
|
|||
wlr_scene_node_reparent(&c->scene->node,
|
||||
layers[c->isfloating ? LyrTop : LyrTile]);
|
||||
}
|
||||
|
||||
client_reparent_group(c);
|
||||
setborder_color(c);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue