aboutsummaryrefslogtreecommitdiff
path: root/driver-csi.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-04-24 17:42:01 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-04-24 17:42:01 +0100
commitf06cd325a20a486619898bcf60726454d24906ed (patch)
tree71d135da3c3525aac4a47b3d87b0dba280678fe1 /driver-csi.c
parentc944b95696aebf67bc023a17a10b6ec17bf6f0a5 (diff)
downloadtermo-f06cd325a20a486619898bcf60726454d24906ed.tar.gz
termo-f06cd325a20a486619898bcf60726454d24906ed.tar.xz
termo-f06cd325a20a486619898bcf60726454d24906ed.zip
Ensure that key->type field is properly set for all mouse encoding protocols
Diffstat (limited to 'driver-csi.c')
-rw-r--r--driver-csi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/driver-csi.c b/driver-csi.c
index d305356..0609e64 100644
--- a/driver-csi.c
+++ b/driver-csi.c
@@ -160,6 +160,7 @@ static TermKeyResult handle_csi_mouse(TermKey *tk, TermKeyKey *key, int cmd, lon
cmd &= 0xff;
if(!initial && args >= 3) { // rxvt protocol
+ key->type = TERMKEY_TYPE_MOUSE;
key->code.mouse[0] = arg[0];
key->modifiers = (key->code.mouse[0] & 0x1c) >> 2;
@@ -171,6 +172,7 @@ static TermKeyResult handle_csi_mouse(TermKey *tk, TermKeyKey *key, int cmd, lon
}
if(initial == '<' && args >= 3) { // SGR protocol
+ key->type = TERMKEY_TYPE_MOUSE;
key->code.mouse[0] = arg[0];
key->modifiers = (key->code.mouse[0] & 0x1c) >> 2;