「dwm-cursorwarp」を追加した

このコミットが含まれているのは:
守矢諏訪子 2023-11-22 19:32:28 +09:00
コミット 74277ac559
1個のファイルの変更10行の追加1行の削除

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