diff options
author | stanley lieber <stanley.lieber@gmail.com> | 2012-04-24 19:53:05 -0500 |
---|---|---|
committer | stanley lieber <stanley.lieber@gmail.com> | 2012-04-24 19:53:05 -0500 |
commit | caa6d7701d7ce8fa09be5717d4095d0c81c4f50a (patch) | |
tree | 554b011baa4d7e56bcddfdec515aa163d8e4925c | |
parent | 4f1575a44ee0a22e1a8c8e6dbcc552f36fa69480 (diff) | |
download | plan9front-caa6d7701d7ce8fa09be5717d4095d0c81c4f50a.tar.xz |
samterm: cleanup
-rw-r--r-- | sys/src/cmd/samterm/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/src/cmd/samterm/main.c b/sys/src/cmd/samterm/main.c index 6b90ca2b0..232258fd7 100644 --- a/sys/src/cmd/samterm/main.c +++ b/sys/src/cmd/samterm/main.c @@ -75,7 +75,8 @@ threadmain(int argc, char *argv[]) continue; } nwhich = flwhich(mousep->xy); - scr = which && ptinrect(mousep->xy, which->scroll); + scr = which && (ptinrect(mousep->xy, which->scroll) || + mousep->buttons&(8|16)); if(mousep->buttons) flushtyping(1); if((mousep->buttons&1)==0) @@ -94,11 +95,11 @@ threadmain(int argc, char *argv[]) chord &= ~4; } } - } else if(mousep->buttons&1 || mousep->buttons&8){ + }else if(mousep->buttons&(1|8)){ if(nwhich){ if(nwhich!=which) current(nwhich); - else if(scr || mousep->buttons&8) + else if(scr) scroll(which, 1); else{ t=(Text *)which->user1; @@ -116,8 +117,8 @@ threadmain(int argc, char *argv[]) scroll(which, 2); else menu2hit(); - }else if((mousep->buttons&4 || mousep->buttons&16)){ - if(scr || mousep->buttons&16) + }else if(mousep->buttons&(4|16)){ + if(scr) scroll(which, 3); else menu3hit(); |