1
0
mirror of git://git.suckless.org/dwm synced 2025-07-26 09:42:11 -07:00

Compare commits

...

12 Commits
3.9 ... 4.0

Author SHA1 Message Date
Anselm R. Garbe
22399a3bc0 fixed the border issue for mplayer, ff is definately broken when using F11 (fullscreen mode) 2007-04-19 09:24:25 +02:00
Anselm R. Garbe
ad2508f957 touch border 2007-04-19 08:53:40 +02:00
Anselm R. Garbe
b078599833 set border at manage time 2007-04-18 21:11:46 +02:00
Anselm R. Garbe
1e80207876 using pixelcarnage-monospace (proggyclean), because this is better to the eyes 2007-04-18 17:29:38 +02:00
Anselm R. Garbe
464fc2cd18 changed border handling 2007-04-17 14:56:46 +02:00
Anselm R. Garbe
be8d6d40f6 changing order of c->border restorage 2007-04-13 12:22:00 +02:00
Anselm R. Garbe
f0c2353393 I used 2006 in other places as well 2007-04-13 11:41:39 +02:00
Anselm R. Garbe
a730213c3b yet another fix of copyright compactisition 2007-04-13 11:40:09 +02:00
Anselm R. Garbe
399993c6b5 making Copyright notices more compact 2007-04-13 11:32:38 +02:00
Anselm R. Garbe
4d318060a2 next version will be 4.0, so don't expect it within the next days 2007-04-11 15:18:16 +02:00
Anselm R. Garbe
540d5eed46 make also transients floating when we do not know the main window 2007-04-11 15:17:29 +02:00
Anselm R. Garbe
7d071ce2bd Added tag 3.9 for changeset 55478328b242 2007-04-02 11:11:47 +02:00
14 changed files with 61 additions and 59 deletions

View File

@@ -41,3 +41,4 @@ d3876aa792923f9a95f7ad0c7f0134533404df35 3.2.2
20ec6976cee1fcfee0c2f354ae382ee3f9f68efa 3.6.1
baee494346e520f8dee2cee9491b8350064770d2 3.7
2ea201354cf016407ea93e1e390d1422940d29b0 3.8
55478328b2422c700c5404a774c85e77322f41a3 3.9

View File

@@ -1,7 +1,7 @@
MIT/X Consortium License
(C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
(C)opyright MMVI-MMVII Sander van Dijk <a dot h dot vandijk at gmail dot com>
© 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
© 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),

View File

@@ -1,5 +1,5 @@
# dwm - dynamic window manager
# (C)opyright MMVI-MMVII Anselm R. Garbe
# © 2006-2007 Anselm R. Garbe, Sander van Dijk
include config.mk

View File

@@ -1,6 +1,6 @@
/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
* See LICENSE file for license details. */
#include "dwm.h"
#include <stdlib.h>
#include <string.h>
@@ -173,8 +173,9 @@ killclient(const char *arg) {
void
manage(Window w, XWindowAttributes *wa) {
Client *c, *t;
Client *c, *t = NULL;
Window trans;
Status rettrans;
XWindowChanges wc;
c = emallocz(sizeof(Client));
@@ -184,13 +185,13 @@ manage(Window w, XWindowAttributes *wa) {
c->y = wa->y;
c->w = wa->width;
c->h = wa->height;
c->oldborder = wa->border_width;
if(c->w == sw && c->h == sh) {
c->border = 0;
c->x = sx;
c->y = sy;
c->border = wa->border_width;
}
else {
c->border = BORDERPX;
if(c->x + c->w + 2 * c->border > wax + waw)
c->x = wax + waw - c->w - 2 * c->border;
if(c->y + c->h + 2 * c->border > way + wah)
@@ -199,21 +200,22 @@ manage(Window w, XWindowAttributes *wa) {
c->x = wax;
if(c->y < way)
c->y = way;
c->border = BORDERPX;
}
updatesizehints(c);
XSelectInput(dpy, w,
StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
XGetTransientForHint(dpy, w, &trans);
grabbuttons(c, False);
wc.border_width = c->border;
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
configure(c); /* propagates border_width, if size doesn't change */
updatesizehints(c);
XSelectInput(dpy, w,
StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
grabbuttons(c, False);
updatetitle(c);
if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success))
for(t = clients; t && t->win != trans; t = t->next);
settags(c, t);
if(!c->isfloating)
c->isfloating = (t != NULL) || c->isfixed;
c->isfloating = (rettrans == Success) || c->isfixed;
attach(c);
attachstack(c);
c->isbanned = True;
@@ -269,10 +271,6 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
}
if(w <= 0 || h <= 0)
return;
if(w == sw && h == sh)
c->border = 0;
else
c->border = BORDERPX;
/* offscreen appearance fixes */
if(x > sw)
x = sw - w - 2 * c->border;
@@ -383,10 +381,13 @@ updatetitle(Client *c) {
void
unmanage(Client *c) {
Client *nc;
XWindowChanges wc;
wc.border_width = c->oldborder;
/* The server grab construct avoids race conditions. */
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
XConfigureWindow(dpy, c->win, CWBorderWidth, &wc); /* restore border */
detach(c);
detachstack(c);
if(sel == c) {

View File

@@ -1,10 +1,10 @@
/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
* See LICENSE file for license details. */
/* appearance */
#define BORDERPX 1
#define FONT "-*-proggyclean-medium-r-*-*-13-*-*-*-*-*-*-*"
#define FONT "-*-pixelcarnage monospace-*-r-*-*-14-*-*-*-*-*-*-*"
#define NORMBORDERCOLOR "#333"
#define NORMBGCOLOR "#222"
#define NORMFGCOLOR "#ccc"

View File

@@ -1,6 +1,6 @@
/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
* See LICENSE file for license details. */
/* appearance */
#define BORDERPX 1

View File

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

6
draw.c
View File

@@ -1,6 +1,6 @@
/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
* See LICENSE file for license details. */
#include "dwm.h"
#include <string.h>

5
dwm.h
View File

@@ -1,4 +1,5 @@
/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
* See LICENSE file for license details.
*
* dynamic window manager is designed like any other X client as well. It is
@@ -49,7 +50,7 @@ struct Client {
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int minax, maxax, minay, maxay;
long flags;
unsigned int border;
unsigned int border, oldborder;
Bool isbanned, isfixed, ismax, isfloating;
Bool *tags;
Client *next;

View File

@@ -1,6 +1,6 @@
/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
* See LICENSE file for license details. */
#include "dwm.h"
#include <stdio.h>
#include <stdlib.h>

View File

@@ -1,6 +1,6 @@
/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
* See LICENSE file for license details. */
#include "dwm.h"
#include <stdlib.h>
@@ -38,18 +38,18 @@ tile(void) {
ny = way;
if(i < nmaster) {
ny += i * mh;
nw = mw - 2 * BORDERPX;
nh = mh - 2 * BORDERPX;
nw = mw - 2 * c->border;
nh = mh - 2 * c->border;
}
else { /* tile window */
nx += mw;
nw = tw - 2 * BORDERPX;
if(th > 2 * BORDERPX) {
nw = tw - 2 * c->border;
if(th > 2 * c->border) {
ny += (i - nmaster) * th;
nh = th - 2 * BORDERPX;
nh = th - 2 * c->border;
}
else /* fallback if th <= 2 * BORDERPX */
nh = wah - 2 * BORDERPX;
else /* fallback if th <= 2 * c->border */
nh = wah - 2 * c->border;
}
resize(c, nx, ny, nw, nh, False);
i++;

11
main.c
View File

@@ -1,7 +1,6 @@
/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
* See LICENSE file for license details. */
#include "dwm.h"
#include <errno.h>
#include <locale.h>
@@ -82,7 +81,7 @@ initfont(const char *fontstr) {
dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def);
if(missing) {
while(n--)
fprintf(stderr, "missing fontset: %s\n", missing[n]);
fprintf(stderr, "dwm: missing fontset: %s\n", missing[n]);
XFreeStringList(missing);
}
if(dc.font.set) {
@@ -256,7 +255,7 @@ main(int argc, char *argv[]) {
XEvent ev;
if(argc == 2 && !strncmp("-v", argv[1], 3))
eprint("dwm-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n");
eprint("dwm-"VERSION", © 2004-2007 Anselm R. Garbe, Sander van Dijk\n");
else if(argc != 1)
eprint("usage: dwm [-v]\n");
setlocale(LC_CTYPE, "");

6
tag.c
View File

@@ -1,6 +1,6 @@
/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
* See LICENSE file for license details. */
#include "dwm.h"
#include <regex.h>
#include <stdio.h>

6
util.c
View File

@@ -1,6 +1,6 @@
/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
* See LICENSE file for license details. */
#include "dwm.h"
#include <stdarg.h>
#include <stdio.h>