1
0
mirror of git://git.suckless.org/dwm synced 2025-08-02 05:02:17 -07:00

Compare commits

...

7 Commits
3.2.1 ... 3.3

Author SHA1 Message Date
Anselm R. Garbe
042297b27b applied Sander's drop_bh patch 2007-01-31 20:08:55 +01:00
Anselm R. Garbe
a5cb80b86c handling WM_STATE seems to make DnD in gtk/qt apps working, well let's handle this in dwm as well 2007-01-28 20:29:41 +01:00
Anselm R. Garbe
7e98db251e regarding to http://plan9.bell-labs.com/sources/contrib/rsc/man.ps the BUGS section should appear after SEE ALSO section. 2007-01-26 12:41:15 +01:00
Anselm R. Garbe
bced9077f9 renamed CAVEATS into BUGS 2007-01-26 12:31:57 +01:00
Anselm R. Garbe
82fed986f9 Added tag 3.2.2 for changeset d3876aa79292 2007-01-25 10:05:02 +01:00
Anselm R. Garbe
2c1db7ed35 prepared yet another hotfix release 2007-01-25 09:59:48 +01:00
Anselm R. Garbe
ea4827a578 Added tag 3.2.1 for changeset f2cabc83a18f 2007-01-24 17:25:37 +01:00
7 changed files with 25 additions and 9 deletions

View File

@@ -32,3 +32,5 @@ c7f84f23ec5aef29988dcdc4ec22a7352ee8f58e 2.5.1
76b58d21ea98257c05565a3b9c850b9b26a32968 3.0 76b58d21ea98257c05565a3b9c850b9b26a32968 3.0
e1c8bef05e6e48df4f26471ea0712aa43ab9d949 3.1 e1c8bef05e6e48df4f26471ea0712aa43ab9d949 3.1
4ce65f61f01b055fa6c2901c6d2527ef741aa4bf 3.2 4ce65f61f01b055fa6c2901c6d2527ef741aa4bf 3.2
f2cabc83a18f9b5b548159329ddd4dee904fa31f 3.2.1
d3876aa792923f9a95f7ad0c7f0134533404df35 3.2.2

View File

@@ -53,6 +53,13 @@ grabbuttons(Client *c, Bool focused) {
GrabModeAsync, GrabModeSync, None, None); GrabModeAsync, GrabModeSync, None, None);
} }
static void
setclientstate(Client *c, long state) {
long data[] = {state, None};
XChangeProperty(dpy, c->win, wmatom[WMState], wmatom[WMState], 32,
PropModeReplace, (unsigned char *)data, 2);
}
static int static int
xerrordummy(Display *dsply, XErrorEvent *ee) { xerrordummy(Display *dsply, XErrorEvent *ee) {
return 0; return 0;
@@ -169,6 +176,7 @@ manage(Window w, XWindowAttributes *wa) {
stack = clients = c; stack = clients = c;
XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
XMapWindow(dpy, c->win); XMapWindow(dpy, c->win);
setclientstate(c, NormalState);
if(isvisible(c)) if(isvisible(c))
focus(c); focus(c);
arrange(); arrange();
@@ -178,6 +186,8 @@ void
resize(Client *c, Bool sizehints) { resize(Client *c, Bool sizehints) {
XWindowChanges wc; XWindowChanges wc;
if(c->w <= 0 || c->h <= 0)
return;
if(sizehints) { if(sizehints) {
if(c->incw) if(c->incw)
c->w -= (c->w - c->basew) % c->incw; c->w -= (c->w - c->basew) % c->incw;
@@ -291,6 +301,7 @@ unmanage(Client *c) {
focus(nc); focus(nc);
} }
XUngrabButton(dpy, AnyButton, AnyModifier, c->win); XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
setclientstate(c, WithdrawnState);
free(c->tags); free(c->tags);
free(c); free(c);
XSync(dpy, False); XSync(dpy, False);

View File

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

6
dwm.1
View File

@@ -131,7 +131,9 @@ Resize current window while dragging (floating mode only).
.SH CUSTOMIZATION .SH CUSTOMIZATION
dwm is customized by creating a custom config.h and (re)compiling the source 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 SEE ALSO
.BR dmenu (1)
.SH BUGS
The status bar may display The status bar may display
.BR "EOF" .BR "EOF"
when dwm has been started by an X session manager like when dwm has been started by an X session manager like
@@ -145,5 +147,3 @@ 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 can set the following environment variable (to use the older Motif
backend instead): backend instead):
.BR AWT_TOOLKIT=MToolkit . .BR AWT_TOOLKIT=MToolkit .
.SH SEE ALSO
.BR dmenu (1)

2
dwm.h
View File

@@ -40,7 +40,7 @@
#define PROTODELWIN 1 #define PROTODELWIN 1
enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */ enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */
enum { WMProtocols, WMDelete, WMLast }; /* default atoms */ enum { WMProtocols, WMDelete, WMState, WMLast }; /* default atoms */
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
enum { ColBorder, ColFG, ColBG, ColLast }; /* color */ enum { ColBorder, ColFG, ColBG, ColLast }; /* color */

1
main.c
View File

@@ -92,6 +92,7 @@ setup(void) {
/* init atoms */ /* init atoms */
wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False);
netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32, XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,

10
view.c
View File

@@ -98,11 +98,11 @@ dotile(void) {
else { /* tile window */ else { /* tile window */
c->x += mw; c->x += mw;
c->w = tw - 2 * BORDERPX; c->w = tw - 2 * BORDERPX;
if(th > bh) { if(th > 2 * BORDERPX) {
c->y += (i - nmaster) * th; c->y += (i - nmaster) * th;
c->h = th - 2 * BORDERPX; c->h = th - 2 * BORDERPX;
} }
else /* fallback if th < bh */ else /* fallback if th <= 2 * BORDERPX */
c->h = wah - 2 * BORDERPX; c->h = wah - 2 * BORDERPX;
} }
resize(c, False); resize(c, False);
@@ -149,7 +149,8 @@ focusprev(Arg *arg) {
void void
incnmaster(Arg *arg) { incnmaster(Arg *arg) {
if((arrange == dofloat) || (nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh)) if((arrange == dofloat) || (nmaster + arg->i < 1)
|| (wah / (nmaster + arg->i) <= 2 * BORDERPX))
return; return;
nmaster += arg->i; nmaster += arg->i;
if(sel) if(sel)
@@ -173,7 +174,8 @@ resizemaster(Arg *arg) {
if(arg->i == 0) if(arg->i == 0)
master = MASTER; master = MASTER;
else { else {
if(master + arg->i > 950 || master + arg->i < 50) if(waw * (master + arg->i) / 1000 >= waw - 2 * BORDERPX
|| waw * (master + arg->i) / 1000 <= 2 * BORDERPX)
return; return;
master += arg->i; master += arg->i;
} }