mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
focusadjacenttags + scratchpad compatibility issue ref. #236
This commit is contained in:
parent
96820b2d51
commit
55592623f5
@ -1,8 +1,9 @@
|
|||||||
void
|
void
|
||||||
tagtoleft(const Arg *arg)
|
tagtoleft(const Arg *arg)
|
||||||
{
|
{
|
||||||
|
unsigned int MASK = (1 << NUMTAGS) - 1;
|
||||||
if (selmon->sel != NULL
|
if (selmon->sel != NULL
|
||||||
&& __builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
|
&& __builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
||||||
&& selmon->tagset[selmon->seltags] > 1) {
|
&& selmon->tagset[selmon->seltags] > 1) {
|
||||||
selmon->sel->tags >>= 1;
|
selmon->sel->tags >>= 1;
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
@ -13,9 +14,10 @@ tagtoleft(const Arg *arg)
|
|||||||
void
|
void
|
||||||
tagtoright(const Arg *arg)
|
tagtoright(const Arg *arg)
|
||||||
{
|
{
|
||||||
|
unsigned int MASK = (1 << NUMTAGS) - 1;
|
||||||
if (selmon->sel != NULL
|
if (selmon->sel != NULL
|
||||||
&& __builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
|
&& __builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
||||||
&& selmon->tagset[selmon->seltags] & (TAGMASK >> 1)) {
|
&& selmon->tagset[selmon->seltags] & (MASK >> 1)) {
|
||||||
selmon->sel->tags <<= 1;
|
selmon->sel->tags <<= 1;
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
arrange(selmon);
|
arrange(selmon);
|
||||||
@ -25,7 +27,8 @@ tagtoright(const Arg *arg)
|
|||||||
void
|
void
|
||||||
viewtoleft(const Arg *arg)
|
viewtoleft(const Arg *arg)
|
||||||
{
|
{
|
||||||
if (__builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
|
unsigned int MASK = (1 << NUMTAGS) - 1;
|
||||||
|
if (__builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
||||||
&& selmon->tagset[selmon->seltags] > 1) {
|
&& selmon->tagset[selmon->seltags] > 1) {
|
||||||
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] >> 1 }));
|
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] >> 1 }));
|
||||||
}
|
}
|
||||||
@ -34,8 +37,9 @@ viewtoleft(const Arg *arg)
|
|||||||
void
|
void
|
||||||
viewtoright(const Arg *arg)
|
viewtoright(const Arg *arg)
|
||||||
{
|
{
|
||||||
if (__builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
|
unsigned int MASK = (1 << NUMTAGS) - 1;
|
||||||
&& selmon->tagset[selmon->seltags] & (TAGMASK >> 1)) {
|
if (__builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
||||||
|
&& selmon->tagset[selmon->seltags] & (MASK >> 1)) {
|
||||||
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] << 1 }));
|
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] << 1 }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -43,8 +47,9 @@ viewtoright(const Arg *arg)
|
|||||||
void
|
void
|
||||||
tagandviewtoleft(const Arg *arg)
|
tagandviewtoleft(const Arg *arg)
|
||||||
{
|
{
|
||||||
|
unsigned int MASK = (1 << NUMTAGS) - 1;
|
||||||
if (selmon->sel != NULL
|
if (selmon->sel != NULL
|
||||||
&& __builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
|
&& __builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
||||||
&& selmon->tagset[selmon->seltags] > 1) {
|
&& selmon->tagset[selmon->seltags] > 1) {
|
||||||
selmon->sel->tags >>= 1;
|
selmon->sel->tags >>= 1;
|
||||||
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] >> 1 }));
|
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] >> 1 }));
|
||||||
@ -54,9 +59,10 @@ tagandviewtoleft(const Arg *arg)
|
|||||||
void
|
void
|
||||||
tagandviewtoright(const Arg *arg)
|
tagandviewtoright(const Arg *arg)
|
||||||
{
|
{
|
||||||
|
unsigned int MASK = (1 << NUMTAGS) - 1;
|
||||||
if (selmon->sel != NULL
|
if (selmon->sel != NULL
|
||||||
&& __builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
|
&& __builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
||||||
&& selmon->tagset[selmon->seltags] & (TAGMASK >> 1)) {
|
&& selmon->tagset[selmon->seltags] & (MASK >> 1)) {
|
||||||
selmon->sel->tags <<= 1;
|
selmon->sel->tags <<= 1;
|
||||||
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] << 1 }));
|
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] << 1 }));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user