diff options
| -rw-r--r-- | config.h | 5 | ||||
| -rw-r--r-- | dwm.c | 14 |
2 files changed, 15 insertions, 4 deletions
@@ -10,8 +10,9 @@ /* appearance */ /* followclient: - * 1: if sending a client to a new tag with no other clients, the view will - * follow the client + * 1: + * - the view will follow the client when sent to an empty tag + * - the focus and cursor will follow the client when sent to a new monitor * 0: default behaviour */ static const int followclient = 1; static unsigned int borderpx = 2; /* border pixel of windows */ @@ -2122,8 +2122,18 @@ sendmon(Client *c, Monitor *m) attachaside(c); attachstack(c); setclienttagprop(c); - focus(NULL); - arrange(NULL); + + if (followclient) { + focus(c); + arrange(NULL); + + if (c && c->mon == selmon) { + XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2); + } + } else { + focus(NULL); + arrange(NULL); + } } void |