ref: b53399a1815178d6a221f580be4e5bce9614474d
parent: 0be6a77dcacc2ab434f6e413fba9c4a57ada0982
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu Jan 2 07:44:42 EST 2020
alt: alternate between noblk/end to fix rendering reacting too late
--- a/demo/plan9.c
+++ b/demo/plan9.c
@@ -18,9 +18,9 @@
{ nil, &m, CHANRCV },
{ nil, nil, CHANRCV },
{ nil, &key, CHANRCV },
- { nil, nil, CHANEND },
+ { nil, nil, CHANNOBLK},
};
- int oldbuttons, b, nkey, entering;
+ int oldbuttons, b, nkey;
char text[5];
mu_Command *cmd;
mu_Context *ctx;
@@ -51,7 +51,6 @@
ctx->style->font = display->defaultfont;
oldbuttons = 0;
- entering = 1;
for (;;) {
/* process frame */
process_frame(ctx);
@@ -69,11 +68,6 @@
}
r_present();
- if (entering) {
- entering = 0;
- continue;
- }
-
switch (alt(a)) {
case 0: /* mouse */
m.xy.x -= screen->r.min.x;
@@ -112,6 +106,8 @@
mu_input_keyup(ctx, nkey);
}
}
+
+ a[nelem(a)-1].op = a[nelem(a)-1].op == CHANNOBLK ? CHANEND : CHANNOBLK;
}
end: