History

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

Sigrid Haflínudóttir committed 6 years ago

Commit 37879731 parent 31668971 file · +7 −2Browse files

Unified · Split

plan9.c+7−2
@@ -732,6 +732,7 @@ threadmain(int argc, char **argv) · 731 unmodified lines
732 oldw = w = field.width;732 oldw = w = field.width;
733 oldh = h = field.height;733 oldh = h = field.height;
734 734
735noredraw:
735 switch (alt(a)) {736 switch (alt(a)) {
736 case Cmouse:737 case Cmouse:
737 if (m.buttons == 4) {738 if (m.buttons == 4) {
@@ -758,6 +759,8 @@ threadmain(int argc, char **argv) · 20 unmodified lines
758 goto end;759 goto end;
759 }760 }
760 complete = 1;761 complete = 1;
762 } else {
763 goto noredraw;
761 }764 }
762 break;765 break;
763 766
@@ -922,10 +925,12 @@ threadmain(int argc, char **argv) · 158 unmodified lines
922 default:925 default:
923 if (key.rune == Kdel || key.rune == ' ')926 if (key.rune == Kdel || key.rune == ' ')
924 key.rune = '.';927 key.rune = '.';
925 if (orca_is_valid_glyph(key.rune))928 if (orca_is_valid_glyph(key.rune)) {
926 fieldset(key.rune);929 fieldset(key.rune);
927// else930 } else {
928// fprint(2, "unhandled key %04x\n", key.rune);931// fprint(2, "unhandled key %04x\n", key.rune);
932 goto noredraw;
933 }
929 break;934 break;
930 }935 }
931 }936 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t