changeset: 701:875cae19a7aa
tag: tip
user: Pascal Wittmann <mail_AT_pascal-wittmann.de>
date: Fri Mar 04 12:22:49 2011 +0100
files: dwm.suckless.org/patches/flextile-5.8.2.diff dwm.suckless.org/patches/flextile.md
description:
bugfix for flextile
diff -r 22033f585768 -r 875cae19a7aa dwm.suckless.org/patches/flextile-5.8.2.diff
--- a/dwm.suckless.org/patches/flextile-5.8.2.diff Thu Mar 03 14:56:15 2011 +0100
+++ b/dwm.suckless.org/patches/flextile-5.8.2.diff Fri Mar 04 12:22:49 2011 +0100
_AT_@ -66,7 +66,15 @@
typedef struct {
const char *class;
const char *instance;
-_AT_@ -621,6 +601,10 @@ createmon(void) {
+_AT_@ -610,6 +590,7 @@ configurerequest(XEvent *e) {
+
+ Monitor *
+ createmon(void) {
++ unsigned int i;
+ Monitor *m;
+
+ if(!(m = (Monitor *)calloc(1, sizeof(Monitor))))
+_AT_@ -621,6 +602,21 @@ createmon(void) {
m->lt[0] = &layouts[0];
m->lt[1] = &layouts[1 % LENGTH(layouts)];
strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
_AT_@ -74,10 +82,21 @@
+ m->ltaxis[1] = layoutaxis[1];
+ m->ltaxis[2] = layoutaxis[2];
+ m->msplit = 1;
++ /* init tags, bars, layouts, axes, msplits and mfacts */
++ m->curtag = m->prevtag = 1;
++ for(i = 0; i < LENGTH(tags) + 1; i++){
++ m->showbars[i] = m->showbar;
++ m->lts[i] = &layouts[0];
++ m->mfacts[i] = m->mfact;
++ m->ltaxes[i][0] = m->ltaxis[0];
++ m->ltaxes[i][1] = m->ltaxis[1];
++ m->ltaxes[i][2] = m->ltaxis[2];
++ m->msplits[i] = m->msplit;
++ }
return m;
}
-_AT_@ -1494,7 +1478,7 @@ setlayout(const Arg *arg) {
+_AT_@ -1494,7 +1490,7 @@ setlayout(const Arg *arg) {
if(!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
selmon->sellt ^= 1;
if(arg && arg->v)
_AT_@ -86,7 +105,7 @@
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
if(selmon->sel)
arrange(selmon);
-_AT_@ -1512,14 +1496,16 @@ setmfact(const Arg *arg) {
+_AT_@ -1512,14 +1508,14 @@ setmfact(const Arg *arg) {
f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
if(f < 0.1 || f > 0.9)
return;
_AT_@ -99,34 +118,19 @@
setup(void) {
XSetWindowAttributes wa;
-
-+ Monitor *m;
-+ unsigned int i;
+
/* clean up any zombies immediately */
sigchld(0);
-_AT_@ -1555,7 +1541,19 @@ setup(void) {
+_AT_@ -1555,7 +1551,6 @@ setup(void) {
XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
if(!dc.font.set)
XSetFont(dpy, dc.gc, dc.font.xfont->fid);
- /* init bars */
-+ /* init tags, bars, layouts, axes, msplits and mfacts */
-+ for(m = mons; m; m = m->next) {
-+ m->curtag = m->prevtag = 1;
-+ for(i=0; i < LENGTH(tags) + 1; i++) {
-+ m->showbars[i] = m->showbar;
-+ m->lts[i] = &layouts[0];
-+ m->mfacts[i] = m->mfact;
-+ m->ltaxes[i][0] = m->ltaxis[0];
-+ m->ltaxes[i][1] = m->ltaxis[1];
-+ m->ltaxes[i][2] = m->ltaxis[2];
-+ m->msplits[i] = m->msplit;
-+ }
-+ }
updatebars();
updatestatus();
/* EWMH support per view */
-_AT_@ -1635,38 +1633,8 @@ textnw(const char *text, unsigned int le
+_AT_@ -1635,38 +1631,8 @@ textnw(const char *text, unsigned int le
}
void
_AT_@ -166,7 +170,7 @@
updatebarpos(selmon);
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
arrange(selmon);
-_AT_@ -1686,12 +1654,31 @@ togglefloating(const Arg *arg) {
+_AT_@ -1686,12 +1652,31 @@ togglefloating(const Arg *arg) {
void
toggletag(const Arg *arg) {
unsigned int newtags;
_AT_@ -198,7 +202,7 @@
arrange(selmon);
}
}
-_AT_@ -1959,11 +1946,33 @@ updatewmhints(Client *c) {
+_AT_@ -1959,11 +1944,33 @@ updatewmhints(Client *c) {
void
view(const Arg *arg) {
_AT_@ -233,6 +237,7 @@
arrange(selmon);
}
+
diff -up ../dwm-5.8.2-0/flextile.h ./flextile.h
--- ../dwm-5.8.2-0/flextile.h 2010-06-10 23:08:24.000000000 +0200
+++ ./flextile.h 2010-06-10 22:59:20.632706000 +0200
diff -r 22033f585768 -r 875cae19a7aa dwm.suckless.org/patches/flextile.md
--- a/dwm.suckless.org/patches/flextile.md Thu Mar 03 14:56:15 2011 +0100
+++ b/dwm.suckless.org/patches/flextile.md Fri Mar 04 12:22:49 2011 +0100
_AT_@ -58,7 +58,7 @@
## Download ##
* [flextile-5.8.1.diff][1] (14k) (20100531, joten (at) freenet (dot) de)
- * [flextile-5.8.2.diff][2] (13k, +169 SLOC) (20100611, joten (at) freenet (dot) de)
+ * [flextile-5.8.2.diff][2] (13k, +164 SLOC) (20100611, joten (at) freenet (dot) de) updated by Pascal Wittmann `<mail at pascal-wittmann dot de>`
[1]:
http://dwm.suckless.org/patches/flextile-5.8.1.diff
Received on Fri Mar 04 2011 - 12:22:48 CET