Unified · Split
| @@ -125,6 +125,7 @@ static Rectangle srects[3]; · 124 unmodified lines | ||
| 125 | 125 | static Space *space; |
| 126 | 126 | static Image *bg; |
| 127 | 127 | static char hex[12]; |
| 128 | +static int once; | |
| 128 | 129 | |
| 129 | 130 | static ulong |
| 130 | 131 | rgba2u(double *rgba) |
| @@ -414,6 +415,7 @@ readcolors(void *x) · 283 unmodified lines | ||
| 414 | 415 | } |
| 415 | 416 | |
| 416 | 417 | if (c == nil) { |
| 418 | + c = new; | |
| 417 | 419 | if (last != nil) |
| 418 | 420 | last->next = new; |
| 419 | 421 | new->prev = last; |
| @@ -425,6 +427,8 @@ readcolors(void *x) · 5 unmodified lines | ||
| 425 | 427 | ncolors++; |
| 426 | 428 | } |
| 427 | 429 | |
| 430 | + if (!once) | |
| 431 | + printcolor(1, c); | |
| 428 | 432 | unlockdisplay(display); |
| 429 | 433 | sendul(loaded, 0); |
| 430 | 434 | } |
| @@ -460,7 +464,6 @@ plumbproc(void *) · 29 unmodified lines | ||
| 460 | 464 | if ((f = plumbopen("picker", OREAD)) >= 0) { |
| 461 | 465 | while ((m = plumbrecv(f)) != nil) { |
| 462 | 466 | loadtheme(m->data); |
| 463 | − dump(1); | |
| 464 | 467 | plumbfree(m); |
| 465 | 468 | } |
| 466 | 469 | } |
| @@ -484,14 +487,13 @@ threadmain(int argc, char **argv) · 17 unmodified lines | ||
| 484 | 487 | [Cloaded] = { nil, nil, CHANRCV }, |
| 485 | 488 | { nil, nil, CHANEND }, |
| 486 | 489 | }; |
| 487 | − int i, once, oldbuttons, slider; | |
| 490 | + int i, oldbuttons, slider; | |
| 488 | 491 | ulong u; |
| 489 | 492 | char buf[16]; |
| 490 | 493 | |
| 491 | 494 | fmtinstall(L'©', colorfmt); |
| 492 | 495 | |
| 493 | 496 | space = &spaces[0]; |
| 494 | − once = 0; | |
| 495 | 497 | ARGBEGIN{ |
| 496 | 498 | case 'e': |
| 497 | 499 | once = 1; |