Introduction
Introduction Statistics Contact Development Disclaimer Help
tfixed tagmon, re-using detach/detachstack and attach/attachstack - dwm - [fork…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 54dc0d542cbc8eada2250fe80d161a272f30ddac
parent 913333f51840d942bdde891eb2fb3c7f66b83db1
Author: Anselm R Garbe <[email protected]>
Date: Tue, 23 Jun 2009 17:34:20 +0100
fixed tagmon, re-using detach/detachstack and attach/attachstack
Diffstat:
M config.mk | 4 ++--
M dwm.c | 23 ++++++++++++++++-------
2 files changed, 18 insertions(+), 9 deletions(-)
---
diff --git a/config.mk b/config.mk
t@@ -11,8 +11,8 @@ X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# Xinerama, un-comment if you want it
-#XINERAMALIBS = -L${X11LIB} -lXinerama
-#XINERAMAFLAGS = -DXINERAMA
+XINERAMALIBS = -L${X11LIB} -lXinerama
+XINERAMAFLAGS = -DXINERAMA
# includes and libs
INCS = -I. -I/usr/include -I${X11INC}
diff --git a/dwm.c b/dwm.c
t@@ -375,14 +375,14 @@ arrange(void) {
void
attach(Client *c) {
- c->next = selmon->clients;
- selmon->clients = c;
+ c->next = c->mon->clients;
+ c->mon->clients = c;
}
void
attachstack(Client *c) {
- c->snext = selmon->stack;
- selmon->stack = c;
+ c->snext = c->mon->stack;
+ c->mon->stack = c;
}
void
t@@ -1475,11 +1475,20 @@ tag(const Arg *arg) {
void
tagmon(const Arg *arg) {
unsigned int i;
+ Client *c;
Monitor *m;
+ if(!(c = selmon->sel))
+ return;
for(i = 0, m = mons; m; m = m->next, i++)
if(i == arg->ui) {
- selmon->sel->m = m;
+ detach(c);
+ detachstack(c);
+ c->mon = m;
+ attach(c);
+ attachstack(c);
+ selmon->sel = selmon->stack;
+ m->sel = c;
arrange();
break;
}
t@@ -1695,7 +1704,7 @@ updategeom(void) {
for(tm = mons; tm; tm = tm->next)
if(tm->screen_number == m->screen_number) {
m->clients = tm->clients;
- m->stack = tm->stack;
+ m->sel = m->stack = tm->stack;
tm->clients = NULL;
tm->stack = NULL;
for(c = m->clients; c; c = c->next)
t@@ -1715,7 +1724,7 @@ updategeom(void) {
while(tm->stack) {
c = tm->stack->snext;
tm->stack->snext = newmons->stack;
- newmons->stack = tm->stack;
+ newmons->sel = newmons->stack = tm->stack;
tm->stack = c;
}
}
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.