mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-12 13:30:01 -05:00
feat: tag action sync all monitor
This commit is contained in:
parent
b5b697a7b1
commit
38bb406279
5 changed files with 78 additions and 54 deletions
28
src/mango.c
28
src/mango.c
|
|
@ -660,7 +660,8 @@ static void scene_buffer_apply_opacity(struct wlr_scene_buffer *buffer, int sx,
|
|||
int sy, void *data);
|
||||
|
||||
static Client *direction_select(const Arg *arg);
|
||||
static void view_in_mon(const Arg *arg, bool want_animation, Monitor *m);
|
||||
static void view_in_mon(const Arg *arg, bool want_animation, Monitor *m,
|
||||
bool changefocus);
|
||||
|
||||
static void buffer_set_effect(Client *c, BufferData buffer_data);
|
||||
static void snap_scene_buffer_apply_effect(struct wlr_scene_buffer *buffer,
|
||||
|
|
@ -1245,7 +1246,7 @@ void applyrules(Client *c) {
|
|||
!(c->mon == selmon && c->tags & c->mon->tagset[c->mon->seltags]) &&
|
||||
!c->isopensilent && !c->istagsilent) {
|
||||
c->animation.tag_from_rule = true;
|
||||
view_in_mon(&(Arg){.ui = c->tags}, true, c->mon);
|
||||
view_in_mon(&(Arg){.ui = c->tags}, true, c->mon, true);
|
||||
}
|
||||
|
||||
setfullscreen(c, fullscreen_state_backup);
|
||||
|
|
@ -4891,7 +4892,7 @@ void tag_client(const Arg *arg, Client *target_client) {
|
|||
clear_fullscreen_flag(fc);
|
||||
}
|
||||
}
|
||||
view(&(Arg){.ui = arg->ui}, false);
|
||||
view(&(Arg){.ui = arg->ui, .i = arg->i}, false);
|
||||
|
||||
} else {
|
||||
view(arg, false);
|
||||
|
|
@ -5351,7 +5352,8 @@ urgent(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
}
|
||||
|
||||
void view_in_mon(const Arg *arg, bool want_animation, Monitor *m) {
|
||||
void view_in_mon(const Arg *arg, bool want_animation, Monitor *m,
|
||||
bool changefocus) {
|
||||
unsigned int i, tmptag;
|
||||
|
||||
if (!m || (arg->ui != ~0 && m->isoverview)) {
|
||||
|
|
@ -5387,13 +5389,27 @@ void view_in_mon(const Arg *arg, bool want_animation, Monitor *m) {
|
|||
m->pertag->curtag = tmptag;
|
||||
}
|
||||
|
||||
focusclient(focustop(m), 1);
|
||||
toggleseltags:
|
||||
|
||||
if (changefocus)
|
||||
focusclient(focustop(m), 1);
|
||||
arrange(m, want_animation);
|
||||
printstatus();
|
||||
}
|
||||
|
||||
void view(const Arg *arg, bool want_animation) {
|
||||
view_in_mon(arg, want_animation, selmon);
|
||||
Monitor *m, *record_mon;
|
||||
if (arg->i) {
|
||||
record_mon = selmon;
|
||||
view_in_mon(arg, want_animation, record_mon, true);
|
||||
wl_list_for_each(m, &mons, link) {
|
||||
if (!m->wlr_output->enabled || m == record_mon)
|
||||
continue;
|
||||
view_in_mon(arg, want_animation, m, false);
|
||||
}
|
||||
} else {
|
||||
view_in_mon(arg, want_animation, selmon, true);
|
||||
}
|
||||
}
|
||||
|
||||
void virtualkeyboard(struct wl_listener *listener, void *data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue