diff options
| author | Fuwn <[email protected]> | 2024-05-23 17:05:49 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-05-23 17:06:05 -0700 |
| commit | bf16c08ba9cf09df507ed24462ed717f7be0376b (patch) | |
| tree | 52e9294cd33e4217b9ac29da99b340603ad9e84e | |
| parent | feat(dwm.c): systraypinning toggle fix (diff) | |
| download | seiwm-bf16c08ba9cf09df507ed24462ed717f7be0376b.tar.xz seiwm-bf16c08ba9cf09df507ed24462ed717f7be0376b.zip | |
feat(dwm.c): followclient follows on tagmon
| -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 |