Skip to content

Commit 6cdc7da

Browse files
committed
indents
1 parent 4a793f5 commit 6cdc7da

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

src/tint3.c

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include "mouse.h"
3333
#include "dlist.h"
3434

35-
#define INRECT(x,y,rx,ry,rw,rh) ((x) >= (rx) && (x) < (rx)+(rw) && (y) >= (ry) && (y) < (ry)+(rh))
35+
#define INRECT(x,y,a,b,c,d)((x)>=(a)&&(x)<(a)+(c)&&(y)>=(b)&&(y)<(b)+(d))
3636
#define MIN(a,b) ((a) < (b) ? (a) : (b))
3737
#define MAX(a,b) ((a) > (b) ? (a) : (b))
3838
#define DEBUG(str) if (__debug__){puts(str);}
@@ -143,8 +143,13 @@ ColorSet *make_baritem_colours(char *fg, char *bg) {
143143
result->FG = (fg) ? getcolor(dc, fg) : getcolor(dc, bar_font_colour);
144144
result->BG = (bg) ? getcolor(dc, bg) : bar_background_colour;
145145
if(dc->font.xft_font) {
146-
if(!XftColorAllocName(dc->dpy, DefaultVisual(dc->dpy, DefaultScreen(dc->dpy)),
147-
DefaultColormap(dc->dpy, DefaultScreen(dc->dpy)), fg?fg:bar_font_colour, &result->FG_xft)) {
146+
if(!XftColorAllocName(
147+
dc->dpy
148+
,DefaultVisual(dc->dpy, DefaultScreen(dc->dpy))
149+
,DefaultColormap(dc->dpy, DefaultScreen(dc->dpy))
150+
,fg?fg:bar_font_colour, &result->FG_xft)
151+
) {
152+
// do something if it fails
148153
}
149154
}
150155
return result;
@@ -153,7 +158,8 @@ ColorSet *make_baritem_colours(char *fg, char *bg) {
153158
// turn a single item from the config stream into a displayable item
154159
baritem *makeitem(block *block) {
155160
baritem *result = malloc(sizeof(baritem));
156-
result->default_colors = make_baritem_colours(block->forground, block->background);
161+
result->default_colors =
162+
make_baritem_colours(block->forground, block->background);
157163
result->format = block->format;
158164
result->source = block->source;
159165
result->shell = block->shell_click;
@@ -384,10 +390,12 @@ unsigned int total_list_length(dlist *list) {
384390
each(item->elements, element) {
385391
switch(element->opt) {
386392
case 0:
387-
item->length += (element->length = textw(dc, element->text->text));
393+
item->length +=
394+
(element->length=textw(dc, element->text->text));
388395
break;
389396
case 1:
390-
item->length += (element->length = graphlength(element->graph));
397+
item->length +=
398+
(element->length = graphlength(element->graph));
391399
break;
392400
}
393401
}
@@ -560,8 +568,8 @@ void setup() {
560568
win = XCreateWindow(dc->dpy, root, x, y, width, height, 0,
561569
vinfo.depth, InputOutput,
562570
vinfo.visual,
563-
CWOverrideRedirect|CWEventMask|CWColormap|CWBorderPixel|CWBackPixel,
564-
&wa);
571+
CWOverrideRedirect|CWEventMask|CWColormap|CWBorderPixel|CWBackPixel
572+
,&wa);
565573
dc->gc = XCreateGC(dc->dpy, win, 0, NULL);
566574

567575
resizedc(dc, width, height, &vinfo, &wa);

0 commit comments

Comments
 (0)