added some dual head simulator code
This commit is contained in:
parent
7de534192c
commit
fa5ae54bbb
28
dwm.c
28
dwm.c
|
@ -1,3 +1,4 @@
|
||||||
|
#define XINULATOR /* debug, simulates dual head */
|
||||||
/* See LICENSE file for copyright and license details.
|
/* See LICENSE file for copyright and license details.
|
||||||
*
|
*
|
||||||
* dynamic window manager is designed like any other X client as well. It is
|
* dynamic window manager is designed like any other X client as well. It is
|
||||||
|
@ -1158,7 +1159,6 @@ movemouse(const Arg *arg) {
|
||||||
|
|
||||||
Client *
|
Client *
|
||||||
nexttiled(Client *c) {
|
nexttiled(Client *c) {
|
||||||
// TODO: m handling
|
|
||||||
for(; c && (c->isfloating || !ISVISIBLE(c)); c = c->next);
|
for(; c && (c->isfloating || !ISVISIBLE(c)); c = c->next);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
@ -1593,8 +1593,10 @@ unmanage(Client *c) {
|
||||||
XConfigureWindow(dpy, c->win, CWBorderWidth, &wc); /* restore border */
|
XConfigureWindow(dpy, c->win, CWBorderWidth, &wc); /* restore border */
|
||||||
detach(c);
|
detach(c);
|
||||||
detachstack(c);
|
detachstack(c);
|
||||||
if(selmon->sel == c)
|
if(c->mon->sel == c) {
|
||||||
|
c->mon->sel = c->mon->stack;
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
|
}
|
||||||
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
|
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
|
||||||
setclientstate(c, WithdrawnState);
|
setclientstate(c, WithdrawnState);
|
||||||
free(c);
|
free(c);
|
||||||
|
@ -1651,7 +1653,9 @@ updategeom(void) {
|
||||||
Client *c;
|
Client *c;
|
||||||
Monitor *newmons = NULL, *m, *tm;
|
Monitor *newmons = NULL, *m, *tm;
|
||||||
|
|
||||||
#ifdef XINERAMA
|
#ifdef XINULATOR
|
||||||
|
n = 2;
|
||||||
|
#elif defined(XINERAMA)
|
||||||
XineramaScreenInfo *info = NULL;
|
XineramaScreenInfo *info = NULL;
|
||||||
|
|
||||||
if(XineramaIsActive(dpy))
|
if(XineramaIsActive(dpy))
|
||||||
|
@ -1665,7 +1669,23 @@ updategeom(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initialise monitor(s) */
|
/* 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)) {
|
if(XineramaIsActive(dpy)) {
|
||||||
for(i = 0, m = newmons; m; m = m->next, i++) {
|
for(i = 0, m = newmons; m; m = m->next, i++) {
|
||||||
m->screen_number = info[i].screen_number;
|
m->screen_number = info[i].screen_number;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user