Merge remote-tracking branch 'upstream/master' into xft-port
* upstream/master: Account for height of monitors in sorting. bar -> lemonbar in .gitignore, remove config.h in .gitignore Rewrite *p, *(p+1) as p[0], p[1] for readability. Keep percent signs if not followed by {} block.
This commit is contained in:
commit
882c0bc57d
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,3 @@
|
|||
config.h
|
||||
lemonbar
|
||||
*.o
|
||||
*.swp
|
||||
|
|
13
lemonbar.c
13
lemonbar.c
|
@ -581,8 +581,8 @@ parse (char *text)
|
|||
if (*p == '\0' || *p == '\n')
|
||||
break;
|
||||
|
||||
if (*p == '%' && *(p+1) == '{' && (block_end = strchr(p+2, '}'))) {
|
||||
p += 2;
|
||||
if (p[0] == '%' && p[1] == '{' && (block_end = strchr(p++, '}'))) {
|
||||
p++;
|
||||
while (p < block_end) {
|
||||
while (isspace(*p))
|
||||
p++;
|
||||
|
@ -910,10 +910,15 @@ rect_sort_cb (const void *p1, const void *p2)
|
|||
const xcb_rectangle_t *r1 = (xcb_rectangle_t *)p1;
|
||||
const xcb_rectangle_t *r2 = (xcb_rectangle_t *)p2;
|
||||
|
||||
if (r1->x < r2->x || r1->y < r2->y)
|
||||
if (r1->x < r2->x || r1->y + r1->height <= r2->y)
|
||||
{
|
||||
return -1;
|
||||
if (r1->x > r2->x || r1->y > r2->y)
|
||||
}
|
||||
|
||||
if (r1->x > r2->x || r1->y + r1->height > r2->y)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user