<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slosh.git/tests/test_mouse_pixels.py, branch master</title>
<subtitle>an opinionated terminal multiplexer in C with programmable pane chrome</subtitle>
<id>https://git.sl0p.foo/slosh.git/atom/tests/test_mouse_pixels.py?h=master</id>
<link rel='self' href='https://git.sl0p.foo/slosh.git/atom/tests/test_mouse_pixels.py?h=master'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/slosh.git/'/>
<updated>2026-10-09T10:31:53Z</updated>
<entry>
<title>tests: clang-format and ruff catch up on two files</title>
<updated>2026-10-09T10:31:53Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-10-09T10:24:53Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/slosh.git/commit/?id=d04228e9124eca3117843dfb5dfcf531d2107d07'/>
<id>urn:sha1:d04228e9124eca3117843dfb5dfcf531d2107d07</id>
<content type='text'>
No behaviour: argument wrapping in path_test, and one check() call in
test_mouse_pixels that was over the line length. Both are what the
pre-commit hook would have done anyway.
</content>
</entry>
<entry>
<title>mouse: encode pixel reports against the cell size we advertise</title>
<updated>2026-09-29T12:25:34Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-09-29T12:25:34Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/slosh.git/commit/?id=3760c4e99aff06d09edb0575d7596d0607298e71'/>
<id>urn:sha1:3760c4e99aff06d09edb0575d7596d0607298e71</id>
<content type='text'>
A pane is told how big a cell is twice -- in mode 2048's resize report and
in the XTWINOPS answers -- and the mouse encoder was told something else: a
1x1 cell, so that cell coordinates and "pixels" were the same number.

That held until a program turned on SGR-pixel mouse (mode 1016) by itself.
Textual does, the moment in-band resize works, and then divides every
coordinate it is sent by the pixels-per-cell we advertised: a click 30 cells
across and 9 down arrived as (3, 0), so every click in a Textual app landed
in the top-left corner.

Hand the encoder the cell size the pane already has, and put the pointer in
the middle of its cell. A size that contradicts what the same pane was told
about itself is the lie, not the precision.
</content>
</entry>
</feed>
