shithub: orca

Download patch

ref: 37879732644669be2cd9a93db4e3cda144c2fcdf
parent: 31668973191f0075b5bf0d2bf88c419ecfead781
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat Feb 15 14:08:20 EST 2020

plan9: don't redraw on mouse/key events that are ignored

--- a/plan9.c
+++ b/plan9.c
@@ -732,6 +732,7 @@
 		oldw = w = field.width;
 		oldh = h = field.height;
 
+noredraw:
 		switch (alt(a)) {
 		case Cmouse:
 			if (m.buttons == 4) {
@@ -758,6 +759,8 @@
 					goto end;
 				}
 				complete = 1;
+			} else {
+				goto noredraw;
 			}
 			break;
 
@@ -922,10 +925,12 @@
 			default:
 				if (key.rune == Kdel || key.rune == ' ')
 					key.rune = '.';
-				if (orca_is_valid_glyph(key.rune))
+				if (orca_is_valid_glyph(key.rune)) {
 					fieldset(key.rune);
-//				else
+				} else {
 //					fprint(2, "unhandled key %04x\n", key.rune);
+					goto noredraw;
+				}
 				break;
 			}
 		}