feat: add dispatch viewcrossmon and tagcrossmon
This commit is contained in:
@@ -10,10 +10,12 @@ int zoom(const Arg *arg);
|
||||
int tagsilent(const Arg *arg);
|
||||
int tagtoleft(const Arg *arg);
|
||||
int tagtoright(const Arg *arg);
|
||||
int tagcrossmon(const Arg *arg);
|
||||
int viewtoleft(const Arg *arg);
|
||||
int viewtoright(const Arg *arg);
|
||||
int viewtoleft_have_client(const Arg *arg);
|
||||
int viewtoright_have_client(const Arg *arg);
|
||||
int viewcrossmon(const Arg *arg);
|
||||
int togglefloating(const Arg *arg);
|
||||
int togglefullscreen(const Arg *arg);
|
||||
int togglemaximizescreen(const Arg *arg);
|
||||
|
||||
@@ -1051,11 +1051,17 @@ int tagmon(const Arg *arg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!m || !m->wlr_output->enabled || m == c->mon)
|
||||
if (!m || !m->wlr_output->enabled)
|
||||
return 0;
|
||||
|
||||
unsigned int newtags = arg->ui ? c->tags : 0;
|
||||
unsigned int newtags = arg->ui ? arg->ui : arg->i2 ? c->tags : 0;
|
||||
unsigned int target;
|
||||
|
||||
if (c->mon == m) {
|
||||
view(&(Arg){.ui = newtags}, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (c == selmon->sel) {
|
||||
selmon->sel = NULL;
|
||||
}
|
||||
@@ -1072,6 +1078,7 @@ int tagmon(const Arg *arg) {
|
||||
selmon = c->mon;
|
||||
c->float_geom = setclient_coordinate_center(c, c->float_geom, 0, 0);
|
||||
|
||||
// 重新计算居中的坐标
|
||||
// 重新计算居中的坐标
|
||||
if (c->isfloating) {
|
||||
c->geom = c->float_geom;
|
||||
@@ -1415,6 +1422,20 @@ int viewtoright_have_client(const Arg *arg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int viewcrossmon(const Arg *arg) {
|
||||
focusmon(arg);
|
||||
view_in_mon(arg, true, selmon, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int tagcrossmon(const Arg *arg) {
|
||||
if (!selmon->sel)
|
||||
return 0;
|
||||
|
||||
tagmon(&(Arg){.ui = arg->ui, .i = UNDIR, .v = arg->v});
|
||||
return 0;
|
||||
}
|
||||
|
||||
int comboview(const Arg *arg) {
|
||||
unsigned int newtags = arg->ui & TAGMASK;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user