Adding focusfollowmouse patch ref. #364
This commit is contained in:
@@ -22,8 +22,8 @@ combotag(const Arg *arg)
|
||||
combo = 1;
|
||||
selmon->sel->tags = arg->ui & TAGMASK;
|
||||
}
|
||||
focus(NULL);
|
||||
arrange(selmon);
|
||||
focus(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -22,10 +22,10 @@ distributetags(const Arg *arg)
|
||||
#if TAGSYNC_PATCH
|
||||
}
|
||||
selmon = origselmon;
|
||||
focus(NULL);
|
||||
arrange(NULL);
|
||||
#else
|
||||
focus(NULL);
|
||||
#else
|
||||
arrange(selmon);
|
||||
focus(NULL);
|
||||
#endif // TAGSYNC_PATCH
|
||||
}
|
||||
|
@@ -6,8 +6,8 @@ tagtoleft(const Arg *arg)
|
||||
&& __builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
||||
&& selmon->tagset[selmon->seltags] > 1) {
|
||||
selmon->sel->tags >>= 1;
|
||||
focus(NULL);
|
||||
arrange(selmon);
|
||||
focus(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ tagtoright(const Arg *arg)
|
||||
&& __builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
||||
&& selmon->tagset[selmon->seltags] & (MASK >> 1)) {
|
||||
selmon->sel->tags <<= 1;
|
||||
focus(NULL);
|
||||
arrange(selmon);
|
||||
focus(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
9
patch/focusfollowmouse.c
Normal file
9
patch/focusfollowmouse.c
Normal file
@@ -0,0 +1,9 @@
|
||||
Client *
|
||||
getpointerclient(void)
|
||||
{
|
||||
Window dummy, win;
|
||||
int di;
|
||||
unsigned int dui;
|
||||
XQueryPointer(dpy, root, &dummy, &win, &di, &di, &di, &di, &dui);
|
||||
return wintoclient(win);
|
||||
}
|
1
patch/focusfollowmouse.h
Normal file
1
patch/focusfollowmouse.h
Normal file
@@ -0,0 +1 @@
|
||||
static Client *getpointerclient(void);
|
@@ -151,6 +151,9 @@
|
||||
#if FOCUSDIR_PATCH
|
||||
#include "focusdir.c"
|
||||
#endif
|
||||
#if FOCUSFOLLOWMOUSE_PATCH
|
||||
#include "focusfollowmouse.c"
|
||||
#endif
|
||||
#if FOCUSMASTER_PATCH
|
||||
#include "focusmaster.c"
|
||||
#endif
|
||||
|
@@ -154,6 +154,9 @@
|
||||
#if FOCUSADJACENTTAG_PATCH
|
||||
#include "focusadjacenttag.h"
|
||||
#endif
|
||||
#if FOCUSFOLLOWMOUSE_PATCH
|
||||
#include "focusfollowmouse.h"
|
||||
#endif
|
||||
#if FOCUSMASTER_PATCH
|
||||
#include "focusmaster.h"
|
||||
#endif
|
||||
|
@@ -62,8 +62,8 @@ togglescratch(const Arg *arg)
|
||||
if (found) {
|
||||
if (newtagset) {
|
||||
selmon->tagset[selmon->seltags] = newtagset;
|
||||
focus(NULL);
|
||||
arrange(selmon);
|
||||
focus(NULL);
|
||||
}
|
||||
if (ISVISIBLE(found)) {
|
||||
focus(found);
|
||||
|
@@ -6,8 +6,8 @@ scratchpad_hide()
|
||||
if (selmon->sel) {
|
||||
selmon->sel->tags = SCRATCHPAD_MASK;
|
||||
selmon->sel->isfloating = 1;
|
||||
focus(NULL);
|
||||
arrange(selmon);
|
||||
focus(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ scratchpad_show()
|
||||
|
||||
if (scratchpad_last_showed->tags != SCRATCHPAD_MASK) {
|
||||
scratchpad_last_showed->tags = SCRATCHPAD_MASK;
|
||||
focus(NULL);
|
||||
arrange(selmon);
|
||||
focus(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -91,8 +91,8 @@ unswallow(Client *c)
|
||||
setfloatinghint(c);
|
||||
#endif // BAR_EWMHTAGS_PATCH
|
||||
setclientstate(c, NormalState);
|
||||
focus(NULL);
|
||||
arrange(c->mon);
|
||||
focus(NULL);
|
||||
}
|
||||
|
||||
pid_t
|
||||
|
@@ -43,7 +43,7 @@ tagallmon(const Arg *arg)
|
||||
}
|
||||
}
|
||||
|
||||
focus(NULL);
|
||||
arrange(NULL);
|
||||
focus(NULL);
|
||||
}
|
||||
|
||||
|
@@ -37,8 +37,8 @@ tagothermon(const Arg *arg, int dir)
|
||||
sendmon(sel, newmon);
|
||||
if (arg->ui & TAGMASK) {
|
||||
sel->tags = arg->ui & TAGMASK;
|
||||
focus(NULL);
|
||||
arrange(newmon);
|
||||
focus(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -69,7 +69,7 @@ tagswapmon(const Arg *arg)
|
||||
}
|
||||
}
|
||||
|
||||
focus(NULL);
|
||||
arrange(NULL);
|
||||
focus(NULL);
|
||||
}
|
||||
|
||||
|
@@ -132,7 +132,6 @@ xrdb(const Arg *arg)
|
||||
#endif // BAR_ALPHA_PATCH
|
||||
ColCount
|
||||
);
|
||||
focus(NULL);
|
||||
arrange(NULL);
|
||||
focus(NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user