diff options
author | rodri <rgl@antares-labs.eu> | 2023-09-15 22:15:25 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2023-09-15 22:15:25 +0000 |
commit | 48fe28aa56b83af341957b472c023a667639776c (patch) | |
tree | 0a9981bf2b9f0eed983802bc1d80b944f6f2b034 | |
parent | 651db54ad2917ea0e055b74047201ef0b6022e63 (diff) | |
download | battleship-48fe28aa56b83af341957b472c023a667639776c.tar.gz battleship-48fe28aa56b83af341957b472c023a667639776c.tar.bz2 battleship-48fe28aa56b83af341957b472c023a667639776c.zip |
fix mouse button handling.
-rw-r--r-- | bts.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -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; } |