ref: b26a8fbbb6d332c0da8bbfce89eb2fbda6e606eb
parent: 10a102652b4cc3076f2eaa4299413e8777ae3183
author: james palmer <james@biobuf.link>
date: Mon Jul 19 13:56:44 EDT 2021
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.
--- a/acme.h
+++ b/acme.h
@@ -26,6 +26,8 @@
};
struct AEvent {
+ AWin *win;
+
char origin;
char type;
--- a/event.c
+++ b/event.c
@@ -84,6 +84,7 @@
flags = 0;
loop:
+ e->win = w;
e->origin = getc(w);
e->type = getc(w);
e->q0 = getnum(w);