~foura/libacme

b26a8fbbb6d332c0da8bbfce89eb2fbda6e606eb — james palmer 1 year, 10 months ago 10a1026
events: store source window in AEvent struct.

this allows a program to return the event to the source window
given only the AEvent struct. in a multithreaded program this allows
a program to delegate event processing to one thread for all windows.
2 files changed, 3 insertions(+), 0 deletions(-)

M acme.h
M event.c
M acme.h => acme.h +2 -0
@@ 26,6 26,8 @@ struct AWin {
};

struct AEvent {
	AWin *win;

	char origin;
	char type;
	

M event.c => event.c +1 -0
@@ 84,6 84,7 @@ aeventnext(AWin *w, AEvent *e)
	
	flags = 0;
loop:
	e->win = w;
	e->origin = getc(w);
	e->type = getc(w);
	e->q0 = getnum(w);