diff options
| author | Enrico Zandomeni Borba <enricozb@gmail.com> | 2024-08-04 18:41:49 +0200 |
|---|---|---|
| committer | Enrico Zandomeni Borba <enricozb@gmail.com> | 2024-08-04 21:28:21 +0200 |
| commit | f2e7498ccc56923b1871278ef4f75e5c0c935b40 (patch) | |
| tree | 7a387090ded4630a765486eca16b514be68b7e27 /src/array.hh | |
| parent | e7605b4ec9b3cf1330ce705f329a790899b69706 (diff) | |
fix mouse coord underflow
previously, clicking on the status line if it is on the top of the
window results on a coord.line = 1 << 16, or there abouts. This is
because the expression
(key & 0xFFFF0000) >> 16
results in an `shr` instruction which does not propagate the sign
bit. Mouse event coordinates can be negative if the status line is
on top and the status line is clicked. The new line
(int32_t) (key & 0xFFFF0000) >> 16
properly propagates the sign bit, leading to the correct signed
numeric line coordinate.
Diffstat (limited to 'src/array.hh')
0 files changed, 0 insertions, 0 deletions
