1
0
mirror of git://git.suckless.org/dwm synced 2025-08-05 06:32:24 -07:00

Compare commits

...

11 Commits
2.6 ... 2.7

Author SHA1 Message Date
arg@mig29
c7da124149 applied Sanders patch 2006-12-13 14:15:38 +01:00
arg@mig29
21bd90d7d3 fixed man page, status bar displays EOF instead of "broken pipe" 2006-12-13 13:53:10 +01:00
arg@mig29
c8f96b5b4c added the java odyssee to CAVEATS section 2006-12-13 13:42:17 +01:00
arg@mig29
ded60365d4 removed Client->grav 2006-12-12 19:14:38 +01:00
arg@mig29
629647dfee removed gravitate for the moment 2006-12-11 16:45:02 +01:00
arg@mig29
4ca3d861f0 disabling configure() during resize 2006-12-11 09:42:16 +01:00
arg@mig29
069e7a6e24 made gravitate effectless, waiting for complains ;) 2006-12-11 08:31:30 +01:00
arg@mig29
ac6e34ea06 fixed diagnostic error message 2006-12-08 11:11:52 +01:00
arg@mig29
a308b7507a removed the hardcoded fixed fallback, it is useless in non-Latin1 environments 2006-12-08 10:40:09 +01:00
arg@mig29
630e7ff26f we don't use the term clients anymore, windows is the better term 2006-12-07 16:38:57 +01:00
arg@mig29
3764ab471b Added tag 2.6 for changeset 5308dd22b6ee8e3218c81d9e7e4125f235bb5778 2006-12-07 14:55:29 +01:00
7 changed files with 16 additions and 70 deletions

View File

@@ -25,3 +25,4 @@ a2c465098a3b972bbed00feda9804b6aae1e9531 2.1
32b246925086910d63147483160281a91a47479f 2.4 32b246925086910d63147483160281a91a47479f 2.4
dcbbfabc8ecc5f33a6cc950584de87da1a368045 2.5 dcbbfabc8ecc5f33a6cc950584de87da1a368045 2.5
c7f84f23ec5aef29988dcdc4ec22a7352ee8f58e 2.5.1 c7f84f23ec5aef29988dcdc4ec22a7352ee8f58e 2.5.1
5308dd22b6ee8e3218c81d9e7e4125f235bb5778 2.6

View File

@@ -131,58 +131,6 @@ getctitle(Window w) {
return NULL; return NULL;
} }
void
gravitate(Client *c, Bool invert) {
int dx = 0, dy = 0;
switch(c->grav) {
default:
break;
case StaticGravity:
case NorthWestGravity:
case NorthGravity:
case NorthEastGravity:
dy = c->border;
break;
case EastGravity:
case CenterGravity:
case WestGravity:
dy = -(c->h / 2) + c->border;
break;
case SouthEastGravity:
case SouthGravity:
case SouthWestGravity:
dy = -(c->h);
break;
}
switch (c->grav) {
default:
break;
case StaticGravity:
case NorthWestGravity:
case WestGravity:
case SouthWestGravity:
dx = c->border;
break;
case NorthGravity:
case CenterGravity:
case SouthGravity:
dx = -(c->w / 2) + c->border;
break;
case NorthEastGravity:
case EastGravity:
case SouthEastGravity:
dx = -(c->w + c->border);
break;
}
if(invert) {
dx = -dx;
dy = -dy;
}
c->x += dx;
c->y += dy;
}
void void
killclient(Arg *arg) { killclient(Arg *arg) {
if(!sel) if(!sel)
@@ -341,10 +289,6 @@ updatesize(Client *c) {
c->minw = c->minh = 0; c->minw = c->minh = 0;
c->isfixed = (c->maxw && c->minw && c->maxh && c->minh && c->isfixed = (c->maxw && c->minw && c->maxh && c->minh &&
c->maxw == c->minw && c->maxh == c->minh); c->maxw == c->minw && c->maxh == c->minh);
if(c->flags & PWinGravity)
c->grav = size.win_gravity;
else
c->grav = NorthWestGravity;
} }
void void

View File

@@ -1,5 +1,5 @@
# dwm version # dwm version
VERSION = 2.6 VERSION = 2.7
# Customize below to fit your system # Customize below to fit your system

7
draw.c
View File

@@ -197,11 +197,8 @@ setfont(const char *fontstr) {
if(dc.font.xfont) if(dc.font.xfont)
XFreeFont(dpy, dc.font.xfont); XFreeFont(dpy, dc.font.xfont);
dc.font.xfont = NULL; dc.font.xfont = NULL;
dc.font.xfont = XLoadQueryFont(dpy, fontstr); if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)))
if (!dc.font.xfont) eprint("error, cannot load font: '%s'\n", fontstr);
dc.font.xfont = XLoadQueryFont(dpy, "fixed");
if (!dc.font.xfont)
eprint("error, cannot init 'fixed' font\n");
dc.font.ascent = dc.font.xfont->ascent; dc.font.ascent = dc.font.xfont->ascent;
dc.font.descent = dc.font.xfont->descent; dc.font.descent = dc.font.xfont->descent;
} }

16
dwm.1
View File

@@ -22,7 +22,7 @@ dwm contains a small status bar which displays all available tags, the mode,
the title of the focused window, and the text read from standard input. The the title of the focused window, and the text read from standard input. The
selected tags are indicated with a different color. The tags of the focused selected tags are indicated with a different color. The tags of the focused
window are indicated with a filled square in the top left corner. The tags window are indicated with a filled square in the top left corner. The tags
which are applied to one or more clients are indicated with an empty square in which are applied to one or more windows are indicated with an empty square in
the top left corner. the top left corner.
.P .P
dwm draws a 1-pixel border around windows to indicate the focus state. dwm draws a 1-pixel border around windows to indicate the focus state.
@@ -122,9 +122,17 @@ dwm is customized by creating a custom config.h and (re)compiling the source
code. This keeps it fast, secure and simple. code. This keeps it fast, secure and simple.
.SH CAVEATS .SH CAVEATS
The status bar may display The status bar may display
.BR "broken pipe" .BR "EOF"
when dwm has been started by when dwm has been started by an X session manager like
.BR xdm (1), .BR xdm (1),
because it closes standard output before executing dwm. because those close standard output before executing dwm.
.P
Java applications which use the XToolkit/XAWT backend may draw grey windows
only. The XToolkit/XAWT backend breaks ICCCM-compliance in recent JDK 1.5 and early
JDK 1.6 versions, because it assumes a reparenting window manager. As a workaround
you can use JDK 1.4 (which doesn't contain the XToolkit/XAWT backend) or you
can set the following environment variable (to use the older Motif
backend instead):
.BR AWT_TOOLKIT=MToolkit .
.SH SEE ALSO .SH SEE ALSO
.BR dmenu (1) .BR dmenu (1)

2
dwm.h
View File

@@ -80,7 +80,6 @@ struct Client {
int rx, ry, rw, rh; /* revert geometry */ int rx, ry, rw, rh; /* revert geometry */
int tx, ty, tw, th; /* title window geometry */ int tx, ty, tw, th; /* title window geometry */
int basew, baseh, incw, inch, maxw, maxh, minw, minh; int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int grav;
long flags; long flags;
unsigned int border; unsigned int border;
Bool isfloat, isfixed, ismax; Bool isfloat, isfixed, ismax;
@@ -114,7 +113,6 @@ extern void configure(Client *c); /* send synthetic configure event */
extern void focus(Client *c); /* focus c, c may be NULL */ extern void focus(Client *c); /* focus c, c may be NULL */
extern Client *getclient(Window w); /* return client of w */ extern Client *getclient(Window w); /* return client of w */
extern Client *getctitle(Window w); /* return client of title window */ extern Client *getctitle(Window w); /* return client of title window */
extern void gravitate(Client *c, Bool invert); /* gravitate c */
extern void killclient(Arg *arg); /* kill c nicely */ extern void killclient(Arg *arg); /* kill c nicely */
extern void manage(Window w, XWindowAttributes *wa); /* manage new client */ extern void manage(Window w, XWindowAttributes *wa); /* manage new client */
extern void resize(Client *c, Bool sizehints, Corner sticky); /* resize c*/ extern void resize(Client *c, Bool sizehints, Corner sticky); /* resize c*/

View File

@@ -161,7 +161,6 @@ configurerequest(XEvent *e) {
if((c = getclient(ev->window))) { if((c = getclient(ev->window))) {
c->ismax = False; c->ismax = False;
gravitate(c, True);
if(ev->value_mask & CWX) if(ev->value_mask & CWX)
c->x = ev->x; c->x = ev->x;
if(ev->value_mask & CWY) if(ev->value_mask & CWY)
@@ -172,7 +171,6 @@ configurerequest(XEvent *e) {
c->h = ev->height; c->h = ev->height;
if(ev->value_mask & CWBorderWidth) if(ev->value_mask & CWBorderWidth)
c->border = ev->border_width; c->border = ev->border_width;
gravitate(c, False);
wc.x = c->x; wc.x = c->x;
wc.y = c->y; wc.y = c->y;
wc.width = c->w; wc.width = c->w;