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