[wiki] [sites] Code style consistency || Dave Kennedy
commit e2c77a9351f2072981af95d18e679e03be3edf0f
Author: Dave Kennedy <dave-kennedy_AT_users.noreply.github.com>
Date: Sun Nov 22 13:30:30 2015 -0700
Code style consistency
diff --git a/dwm.suckless.org/patches/dwm-6.1-uselessgap.diff b/dwm.suckless.org/patches/dwm-6.1-uselessgap.diff
index b51870e..28cb369 100644
--- a/dwm.suckless.org/patches/dwm-6.1-uselessgap.diff
+++ b/dwm.suckless.org/patches/dwm-6.1-uselessgap.diff
_AT_@ -1,15 +1,7 @@
-commit 6d7963f16af5ce9e14deab86efb3a68a5c420268
-Author: jeromenerf <jerome.andrieux_AT_gmail.com>
-Date: Sat Aug 15 18:35:11 2015 +0200
-
- Useless gap for 6.1
-
-diff --git a/dwm.c b/dwm.c
-index c9fdd49..783fcdb 100644
---- a/dwm.c
-+++ b/dwm.c
-_AT_@ -53,8 +53,8 @@
- #define ISVISIBLE(C) ISVISIBLEONTAG(C, C->mon->tagset[C->mon->seltags])
+--- dwm/dwm.c.orig 2015-11-22 13:26:16.664650238 -0700
++++ dwm/dwm.c 2015-11-22 13:25:57.407984351 -0700
+_AT_@ -52,8 +52,8 @@
+ #define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]))
#define LENGTH(X) (sizeof X / sizeof X[0])
#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
-#define WIDTH(X) ((X)->w + 2 * (X)->bw)
_AT_@ -19,13 +11,13 @@ index c9fdd49..783fcdb 100644
#define TAGMASK ((1 << LENGTH(tags)) - 1)
#define TEXTW(X) (drw_text(drw, 0, 0, 0, 0, (X), 0) + drw->fonts[0]->h)
-_AT_@ -1316,12 +1317,34 @@ resize(Client *c, int x, int y, int w, int h, Bool interact) {
- void
- resizeclient(Client *c, int x, int y, int w, int h) {
+_AT_@ -1293,12 +1293,36 @@ void
+ resizeclient(Client *c, int x, int y, int w, int h)
+ {
XWindowChanges wc;
-+ unsigned int n;
-+ unsigned int gapoffset;
-+ unsigned int gapincr;
++ unsigned int n;
++ unsigned int gapoffset;
++ unsigned int gapincr;
+ Client *nbc;
- c->oldx = c->x; c->x = wc.x = x;
_AT_@ -33,28 +25,30 @@ index c9fdd49..783fcdb 100644
- c->oldw = c->w; c->w = wc.width = w;
- c->oldh = c->h; c->h = wc.height = h;
wc.border_width = c->bw;
-+
-+ // Get number of clients for the selected monitor
-+ for(n = 0, nbc = nexttiled(selmon->clients); nbc; nbc = nexttiled(nbc->next), n++);
-+ // Do nothing if layout is floating
-+ if(c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL) {
-+ gapincr = gapoffset = 0 ;
-+ } else {
-+ // Remove border and gap if layout is monocle or only one client
++
++ /* Get number of clients for the selected monitor */
++ for (n = 0, nbc = nexttiled(selmon->clients); nbc; nbc = nexttiled(nbc->next), n++);
++
++ /* Do nothing if layout is floating */
++ if (c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL) {
++ gapincr = gapoffset = 0;
++ } else {
++ /* Remove border and gap if layout is monocle or only one client */
+ if (selmon->lt[selmon->sellt]->arrange == monocle || n == 1) {
-+ gapoffset = 0;
-+ gapincr = -2 * borderpx ;
-+ wc.border_width = 0;
-+ } else {
-+ gapoffset = gappx ;
-+ gapincr = 2 * gappx ;
-+ }
++ gapoffset = 0;
++ gapincr = -2 * borderpx;
++ wc.border_width = 0;
++ } else {
++ gapoffset = gappx;
++ gapincr = 2 * gappx;
++ }
+ }
+
-+ c->oldx = c->x; c->x = wc.x = x + gapoffset ;
-+ c->oldy = c->y; c->y = wc.y = y + gapoffset ;
-+ c->oldw = c->w; c->w = wc.width = w - gapincr ;
-+ c->oldh = c->h; c->h = wc.height = h - gapincr ;
++ c->oldx = c->x; c->x = wc.x = x + gapoffset;
++ c->oldy = c->y; c->y = wc.y = y + gapoffset;
++ c->oldw = c->w; c->w = wc.width = w - gapincr;
++ c->oldh = c->h; c->h = wc.height = h - gapincr;
++
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
configure(c);
XSync(dpy, False);
Received on Sun Nov 22 2015 - 21:29:28 CET
This archive was generated by hypermail 2.3.0
: Sun Nov 22 2015 - 21:36:11 CET