From 48fe28aa56b83af341957b472c023a667639776c Mon Sep 17 00:00:00 2001 From: rodri Date: Fri, 15 Sep 2023 22:15:25 +0000 Subject: fix mouse button handling. --- bts.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bts.c b/bts.c index 6d7a22e..85b8459 100644 --- a/bts.c +++ b/bts.c @@ -645,18 +645,18 @@ mouse(Mousectl *mc) else csetcursor(mctl, nil); - switch(mc->buttons){ - case 1: - lmb(mc); - break; - case 2: - if(oldm.buttons != 2) + if(oldm.buttons != mc->buttons) + switch(mc->buttons){ + case 1: + lmb(mc); + break; + case 2: mmb(mc); - break; - case 4: - rmb(mc); - break; - } + break; + case 4: + rmb(mc); + break; + } oldm = mc->Mouse; } -- cgit v1.2.3