about summary refs log tree commit diff stats
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/dwm.c b/dwm.c
index fbda0bb..88e0b1b 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1,3 +1,4 @@
+#define XINULATOR /* debug, simulates dual head */
 /* See LICENSE file for copyright and license details.
  *
  * dynamic window manager is designed like any other X client as well. It is
@@ -1158,7 +1159,6 @@ movemouse(const Arg *arg) {
 
 Client *
 nexttiled(Client *c) {
-	// TODO: m handling
 	for(; c && (c->isfloating || !ISVISIBLE(c)); c = c->next);
 	return c;
 }
@@ -1593,8 +1593,10 @@ unmanage(Client *c) {
 	XConfigureWindow(dpy, c->win, CWBorderWidth, &wc); /* restore border */
 	detach(c);
 	detachstack(c);
-	if(selmon->sel == c)
+	if(c->mon->sel == c) {
+		c->mon->sel = c->mon->stack;
 		focus(NULL);
+	}
 	XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
 	setclientstate(c, WithdrawnState);
 	free(c);
@@ -1651,7 +1653,9 @@ updategeom(void) {
 	Client *c;
 	Monitor *newmons = NULL, *m, *tm;
 
-#ifdef XINERAMA
+#ifdef XINULATOR
+	n = 2;
+#elif defined(XINERAMA)
 	XineramaScreenInfo *info = NULL;
 
 	if(XineramaIsActive(dpy))
@@ -1665,7 +1669,23 @@ updategeom(void) {
 	}
 
 	/* initialise monitor(s) */
-#ifdef XINERAMA
+#ifdef XINULATOR
+	if(1) {
+		m = newmons;
+		m->screen_number = 0;
+		m->wx = sx;
+		m->my = m->wy = sy;
+		m->ww = sw;
+		m->mh = m->wh = sh / 2;
+		m = newmons->next;
+		m->screen_number = 1;
+		m->wx = sx;
+		m->my = m->wy = sy + sh / 2;
+		m->ww = sw;
+		m->mh = m->wh = sh / 2;
+	}
+	else
+#elif defined(XINERAMA)
 	if(XineramaIsActive(dpy)) {
 		for(i = 0, m = newmons; m; m = m->next, i++) {
 			m->screen_number = info[i].screen_number;
r anselm@anselm1 <unknown> 2008-03-04 21:40:49 +0000 committer anselm@anselm1 <unknown> 2008-03-04 21:40:49 +0000 renamed monocle into maxmise, documented the keybindings in dwm(1)' href='/acidbong/suckless/dwm/commit/config.def.h?h=5.7&id=39af3c2607de029b66498064c4fc374df34fc653'>39af3c2 ^
2dbfda7 ^
00ca643 ^
a8e0772 ^
ae1d865 ^
39d1ecd ^
2ce37bc ^

f196b71 ^
3794c62 ^
f196b71 ^
051a404 ^
f25cc56 ^
5497268 ^
a8e0772 ^
2d4faae ^
12ea925 ^

a6d23fb ^
3794c62 ^

f196b71 ^
349d768 ^
0fe2e78 ^
5cd65f8 ^



0fe2e78 ^
512541b ^
1edf6a7 ^




d662f98 ^
a8e0772 ^
349d768 ^
1edf6a7 ^

5cd65f8 ^




5cd65f8 ^


12ea925 ^



5cd65f8 ^
a8e0772 ^

a9e145f ^



5cd65f8 ^









b515765 ^
5cd65f8 ^

5cd65f8 ^



12ea925 ^

5cd65f8 ^
1edf6a7 ^
5cd65f8 ^


829b6b5 ^


b86c818 ^
5cd65f8 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107