cursor warp
This commit is contained in:
parent
16dc543e11
commit
3e7db78a19
2 changed files with 6 additions and 1 deletions
4
config.h
4
config.h
|
@ -27,7 +27,7 @@ static const char *colors[][3] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
static const char *tags[] = { "!", "@", "#", "$", "%", "^", "&", "*" };
|
static const char *tags[] = { "!", "@", "#", "$", "%" };
|
||||||
|
|
||||||
static const Rule rules[] = {
|
static const Rule rules[] = {
|
||||||
/* xprop(1):
|
/* xprop(1):
|
||||||
|
@ -59,6 +59,8 @@ static const Layout layouts[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* key definitions */
|
/* key definitions */
|
||||||
|
// Mod4Mask is super
|
||||||
|
// Mod1Mask is alt/meta
|
||||||
#define MODKEY Mod4Mask
|
#define MODKEY Mod4Mask
|
||||||
#define TAGKEYS(KEY,TAG) \
|
#define TAGKEYS(KEY,TAG) \
|
||||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||||
|
|
3
dwm.c
3
dwm.c
|
@ -837,6 +837,8 @@ focusmon(const Arg *arg)
|
||||||
unfocus(selmon->sel, 0);
|
unfocus(selmon->sel, 0);
|
||||||
selmon = m;
|
selmon = m;
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
|
if (selmon->sel)
|
||||||
|
XWarpPointer(dpy, None, selmon->sel->win, 0, 0, 0, 0, selmon->sel->w/2, selmon->sel->h/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -862,6 +864,7 @@ focusstack(const Arg *arg)
|
||||||
if (c) {
|
if (c) {
|
||||||
focus(c);
|
focus(c);
|
||||||
restack(selmon);
|
restack(selmon);
|
||||||
|
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w/2, c->h/2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue