changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: sam: don't make scroll-wheel-up change focus (thanks clsmith)

changeset 4454: 020d2d83dd6f
parent 4453: ab6d7e56233d
child 4455: fac8e86df30e
author: cinap_lenrek@felloff.net
date: Tue, 28 Apr 2015 19:32:21 +0200
files: sys/src/cmd/samterm/main.c
description: sam: don't make scroll-wheel-up change focus (thanks clsmith)
     1.1--- a/sys/src/cmd/samterm/main.c
     1.2+++ b/sys/src/cmd/samterm/main.c
     1.3@@ -99,21 +99,19 @@ threadmain(int argc, char *argv[])
     1.4 					}
     1.5 				}
     1.6 			}else if(mousep->buttons&(1|8)){
     1.7-				if(nwhich){
     1.8-					if(nwhich!=which)
     1.9-						current(nwhich);
    1.10-					else if(scr)
    1.11-						scroll(which, (mousep->buttons&8) ? 4 : 1);
    1.12-					else{
    1.13-						t=(Text *)which->user1;
    1.14-						if(flselect(which)){
    1.15-							outTsl(Tdclick, t->tag, which->p0);
    1.16-							t->lock++;
    1.17-						}else if(t!=&cmd)
    1.18-							outcmd();
    1.19-						if(mousep->buttons&1)
    1.20-							chord = mousep->buttons;
    1.21-					}
    1.22+				if(scr)
    1.23+					scroll(which, (mousep->buttons&8) ? 4 : 1);
    1.24+				else if(nwhich && nwhich!=which)
    1.25+					current(nwhich);
    1.26+				else{
    1.27+					t=(Text *)which->user1;
    1.28+					if(flselect(which)){
    1.29+						outTsl(Tdclick, t->tag, which->p0);
    1.30+						t->lock++;
    1.31+					}else if(t!=&cmd)
    1.32+						outcmd();
    1.33+					if(mousep->buttons&1)
    1.34+						chord = mousep->buttons;
    1.35 				}
    1.36 			}else if((mousep->buttons&2) && which){
    1.37 				if(scr)