summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 @@
1#define XINULATOR /* debug, simulates dual head */
1/* See LICENSE file for copyright and license details. 2/* See LICENSE file for copyright and license details.
2 * 3 *
3 * dynamic window manager is designed like any other X client as well. It is 4 * dynamic window manager is designed like any other X client as well. It is
@@ -1158,7 +1159,6 @@ movemouse(const Arg *arg) {
1158 1159
1159Client * 1160Client *
1160nexttiled(Client *c) { 1161nexttiled(Client *c) {
1161 // TODO: m handling
1162 for(; c && (c->isfloating || !ISVISIBLE(c)); c = c->next); 1162 for(; c && (c->isfloating || !ISVISIBLE(c)); c = c->next);
1163 return c; 1163 return c;
1164} 1164}
@@ -1593,8 +1593,10 @@ unmanage(Client *c) {
1593 XConfigureWindow(dpy, c->win, CWBorderWidth, &wc); /* restore border */ 1593 XConfigureWindow(dpy, c->win, CWBorderWidth, &wc); /* restore border */
1594 detach(c); 1594 detach(c);
1595 detachstack(c); 1595 detachstack(c);
1596 if(selmon->sel == c) 1596 if(c->mon->sel == c) {
1597 c->mon->sel = c->mon->stack;
1597 focus(NULL); 1598 focus(NULL);
1599 }
1598 XUngrabButton(dpy, AnyButton, AnyModifier, c->win); 1600 XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
1599 setclientstate(c, WithdrawnState); 1601 setclientstate(c, WithdrawnState);
1600 free(c); 1602 free(c);
@@ -1651,7 +1653,9 @@ updategeom(void) {
1651 Client *c; 1653 Client *c;
1652 Monitor *newmons = NULL, *m, *tm; 1654 Monitor *newmons = NULL, *m, *tm;
1653 1655
1654#ifdef XINERAMA 1656#ifdef XINULATOR
1657 n = 2;
1658#elif defined(XINERAMA)
1655 XineramaScreenInfo *info = NULL; 1659 XineramaScreenInfo *info = NULL;
1656 1660
1657 if(XineramaIsActive(dpy)) 1661 if(XineramaIsActive(dpy))
@@ -1665,7 +1669,23 @@ updategeom(void) {
1665 } 1669 }
1666 1670
1667 /* initialise monitor(s) */ 1671 /* initialise monitor(s) */
1668#ifdef XINERAMA 1672#ifdef XINULATOR
1673 if(1) {
1674 m = newmons;
1675 m->screen_number = 0;
1676 m->wx = sx;
1677 m->my = m->wy = sy;
1678 m->ww = sw;
1679 m->mh = m->wh = sh / 2;
1680 m = newmons->next;
1681 m->screen_number = 1;
1682 m->wx = sx;
1683 m->my = m->wy = sy + sh / 2;
1684 m->ww = sw;
1685 m->mh = m->wh = sh / 2;
1686 }
1687 else
1688#elif defined(XINERAMA)
1669 if(XineramaIsActive(dpy)) { 1689 if(XineramaIsActive(dpy)) {
1670 for(i = 0, m = newmons; m; m = m->next, i++) { 1690 for(i = 0, m = newmons; m; m = m->next, i++) {
1671 m->screen_number = info[i].screen_number; 1691 m->screen_number = info[i].screen_number;