make it easier for the user, if Xinerama support is given, always use the screen 0 as window area/bar area, everything else can be used for floating clients
parent
4a5c8d84db
commit
f22d047d41
11
config.mk
11
config.mk
|
@ -10,14 +10,19 @@ MANPREFIX = ${PREFIX}/share/man
|
||||||
X11INC = /usr/X11R6/include
|
X11INC = /usr/X11R6/include
|
||||||
X11LIB = /usr/X11R6/lib
|
X11LIB = /usr/X11R6/lib
|
||||||
|
|
||||||
|
# Xinerama, uncomment if you don't want it
|
||||||
|
XINERAMALIBS = -L${X11LIB} -lXinerama
|
||||||
|
XINERAMAFLAGS = -DXINERAMA
|
||||||
|
|
||||||
# includes and libs
|
# includes and libs
|
||||||
INCS = -I. -I/usr/include -I${X11INC}
|
INCS = -I. -I/usr/include -I${X11INC}
|
||||||
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
|
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
|
||||||
|
|
||||||
# flags
|
# flags
|
||||||
CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
|
CPPFLAGS = -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
|
||||||
|
CFLAGS = -Os ${INCS} ${CPPFLAGS}
|
||||||
LDFLAGS = -s ${LIBS}
|
LDFLAGS = -s ${LIBS}
|
||||||
#CFLAGS = -g -std=c99 -pedantic -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
|
#CFLAGS = -g -std=c99 -pedantic -Wall -O2 ${INCS} ${CPPFLAGS}
|
||||||
#LDFLAGS = -g ${LIBS}
|
#LDFLAGS = -g ${LIBS}
|
||||||
|
|
||||||
# Solaris
|
# Solaris
|
||||||
|
|
3
dwm.1
3
dwm.1
|
@ -57,6 +57,9 @@ click on a tag label adds/removes that tag to/from the focused window.
|
||||||
Start
|
Start
|
||||||
.BR xterm.
|
.BR xterm.
|
||||||
.TP
|
.TP
|
||||||
|
.B Mod1\-b
|
||||||
|
Toggles bar on and off.
|
||||||
|
.TP
|
||||||
.B Mod1\-space
|
.B Mod1\-space
|
||||||
Toggles between layouts.
|
Toggles between layouts.
|
||||||
.TP
|
.TP
|
||||||
|
|
33
dwm.c
33
dwm.c
|
@ -39,6 +39,9 @@
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
#ifdef XINERAMA
|
||||||
|
#include <X11/extensions/Xinerama.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* macros */
|
/* macros */
|
||||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||||
|
@ -1579,22 +1582,32 @@ updatebar(void) {
|
||||||
|
|
||||||
void
|
void
|
||||||
updategeom(void) {
|
updategeom(void) {
|
||||||
unsigned int i;
|
int i;
|
||||||
|
#ifdef XINERAMA
|
||||||
#ifdef CUSTOMGEOM /* define your own if you are Xinerama user */
|
XineramaScreenInfo *info = NULL;
|
||||||
CUSTOMGEOM
|
|
||||||
#else
|
|
||||||
/* bar geometry*/
|
|
||||||
bx = 0;
|
|
||||||
by = showbar ? (topbar ? 0 : sh - bh) : -bh;
|
|
||||||
bw = sw;
|
|
||||||
|
|
||||||
/* window area geometry */
|
/* window area geometry */
|
||||||
|
if(XineramaIsActive(dpy)) {
|
||||||
|
info = XineramaQueryScreens(dpy, &i);
|
||||||
|
wx = info[0].x_org;
|
||||||
|
wy = showbar && topbar ? info[0].y_org + info[0].height + bh : info[0].y_org;
|
||||||
|
ww = info[0].width;
|
||||||
|
wh = showbar ? info[0].height - bh : info[0].height;
|
||||||
|
XFree(info);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
wx = sx;
|
wx = sx;
|
||||||
wy = showbar && topbar ? sy + bh : sy;
|
wy = showbar && topbar ? sy + bh : sy;
|
||||||
ww = sw;
|
ww = sw;
|
||||||
wh = showbar ? sh - bh : sh;
|
wh = showbar ? sh - bh : sh;
|
||||||
#endif
|
}
|
||||||
|
|
||||||
|
/* bar geometry*/
|
||||||
|
bx = wx;
|
||||||
|
by = showbar ? (topbar ? 0 : wy + wh) : -bh;
|
||||||
|
bw = ww;
|
||||||
|
|
||||||
/* update layout geometries */
|
/* update layout geometries */
|
||||||
for(i = 0; i < LENGTH(layouts); i++)
|
for(i = 0; i < LENGTH(layouts); i++)
|
||||||
|
|
Loading…
Reference in New Issue