「dwm-cursorwarp」を追加した
このコミットが含まれているのは:
コミット
74277ac559
11
dwm.c
11
dwm.c
|
@ -1078,6 +1078,8 @@ focusmon(const Arg *arg)
|
|||
unfocus(selmon->sel, 0);
|
||||
selmon = m;
|
||||
focus(NULL);
|
||||
if (selmon->sel)
|
||||
XWarpPointer(dpy, None, selmon->sel->win, 0, 0, 0, 0, selmon->sel->w/2, selmon->sel->h/2);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1093,6 +1095,7 @@ focusstack(const Arg *arg)
|
|||
i -= ISVISIBLE(c) ? 1 : 0, p = c, c = c->next);
|
||||
focus(c ? c : p);
|
||||
restack(selmon);
|
||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w/2, c->h/2);
|
||||
}
|
||||
|
||||
Atom
|
||||
|
@ -1361,6 +1364,8 @@ manage(Window w, XWindowAttributes *wa)
|
|||
if (term)
|
||||
swallow(term, c);
|
||||
arrange(c->mon);
|
||||
if (c && c->mon == selmon)
|
||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w/2, c->h/2);
|
||||
focus(NULL);
|
||||
}
|
||||
|
||||
|
@ -2212,7 +2217,7 @@ unmanage(Client *c, int destroyed)
|
|||
free(s->swallowing);
|
||||
s->swallowing = NULL;
|
||||
arrange(m);
|
||||
focus(NULL);
|
||||
focus(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2237,6 +2242,10 @@ unmanage(Client *c, int destroyed)
|
|||
focus(NULL);
|
||||
updateclientlist();
|
||||
}
|
||||
|
||||
if (m == selmon && m->sel)
|
||||
XWarpPointer(dpy, None, m->sel->win, 0, 0, 0, 0,
|
||||
m->sel->w/2, m->sel->h/2);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
読み込み中…
新しいイシューから参照