~amavect/makeu

eb7647c0f92b57905561fd418d8ab8836e26f4d3 — amavect 1 year, 6 months ago 0412f68
add immediate flag
1 files changed, 12 insertions(+), 1 deletions(-)

M makeu.c
M makeu.c => makeu.c +12 -1
@@ 23,6 23,7 @@ void valevent(double);
void alphaevent(double);

int pflag = 0;
int iflag = 0;

Image *screenbuf;



@@ 357,12 358,16 @@ threadmain(int argc, char **argv)
	ulong incolor;
	Channel *stdinc;
	Channel *kbdc;
	ulong lastcolor;
	
	incolor = 0xFFFFFFFF;
	ARGBEGIN{
	case 'p':
		pflag++;
		break;
	case 'i':
		iflag++;
		break;
	case 'c':
		incolor = strtocolor(EARGF(usage()));
		if(incolor == DNotacolor)


@@ 387,6 392,7 @@ threadmain(int argc, char **argv)
	hsva.mctl = mctl;
	
	color = incolor;
	lastcolor = color;
	alpha = color & 0xFF;
	rgb = colortorgb(unsetalpha(incolor));
	hsvd = rgbtohsvd(rgb);


@@ 451,8 457,13 @@ threadmain(int argc, char **argv)
				}
				break;
			}
			if(root->mouse(root, m) == 1)
			if(root->mouse(root, m) == 1){
				show();
				if(iflag && lastcolor != color){
					print("0x%08ulX\n", color);
					lastcolor = color;
				}
			}
			break;
		case RESIZE:
			egetwindow();