<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/render.c, branch multi-cursor</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=multi-cursor</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=multi-cursor'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2025-08-31T08:25:17Z</updated>
<entry>
<title>multi-cursor: refactor: add function for dirtying/damaging all multi-cursors</title>
<updated>2025-08-31T08:25:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-08-31T08:25:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=265c93c4c4199fa131476fdbd9eacb9d2fcf51c6'/>
<id>urn:sha1:265c93c4c4199fa131476fdbd9eacb9d2fcf51c6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: dirty all multi-cursor cells *after* rendering a frame</title>
<updated>2025-08-31T07:29:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-08-31T07:29:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4f89c461b15543cebdd3cc1d5112894a5986418f'/>
<id>urn:sha1:4f89c461b15543cebdd3cc1d5112894a5986418f</id>
<content type='text'>
This ensures they're re-rendered the next frame, and fixes an issue
were multi-cursors weren't erased when scrolled. That is, they
scrolled with the content, *and* was re-drawn at the correct (fixed)
location they were scrolled away from.

Since multi-cursors shouldn't scroll with the content, they need to be
erased when the content is scrolled.
</content>
</entry>
<entry>
<title>render: multi-cursor: dirty all multi-cursors before rendering</title>
<updated>2025-08-31T07:23:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-08-31T07:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4907c5d08a56a4c37d85e83b65723b678c853fe1'/>
<id>urn:sha1:4907c5d08a56a4c37d85e83b65723b678c853fe1</id>
<content type='text'>
In most cases, this isn't necessary, since the cursors don't move (and
when the application adds/deletes multi-cursors, we dirty the grid
_then_).

However, when we scroll the viewport, we're basically memmov:ing grid
contents without re-rendering, this can cause multi-cursors to be
"overwritten", and thus we need to explicitly re-render them.

Note: there's still an issue where scrolling content *with* a
multi-cursor doesn't correctly erase the scrolled multi-cursor.
</content>
</entry>
<entry>
<title>render: multi-cursor: translate view-based row number to absolute</title>
<updated>2025-08-31T07:23:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-08-31T07:23:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cc02902db0627dfbb5c290a35c1c0480a916d2bb'/>
<id>urn:sha1:cc02902db0627dfbb5c290a35c1c0480a916d2bb</id>
<content type='text'>
Otherwise we'll lookup the wrong multi-cursor shape.
</content>
</entry>
<entry>
<title>render: fix hollow cursor style for "extra" cursors</title>
<updated>2025-08-29T10:48:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-08-29T10:48:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fba9bb6853695d039913ac8cec2025f2239f22f4'/>
<id>urn:sha1:fba9bb6853695d039913ac8cec2025f2239f22f4</id>
<content type='text'>
When the cursor is "block style", i.e. either when the window is
focused and the cursor is block, or when unfocused and we're supposed
to draw a hollow cursor, then we need to draw it *before* compositing
the glyph.

In all other cases (i.e. beam and underline cursors), it should be
rendered after the glyph.

With the addition of "extra" cursors, the logic for determining which
type it is has become much more complex, and the single if-statement
we had was wrong (it didn't handle "extra" cursors correctly).

Fix by splitting up all the checks into multiple if-statements.
</content>
</entry>
<entry>
<title>render: multi-cursor: wip: colors</title>
<updated>2025-08-28T10:18:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-08-28T10:18:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6319ed8b299208f756b3761392be6256282055b7'/>
<id>urn:sha1:6319ed8b299208f756b3761392be6256282055b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: multi-cell: decrement 'extra-cursor' pointer instead of indexing</title>
<updated>2025-08-28T05:34:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-08-28T05:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=dcabe14392a01fe97836fa5c6fb059c4b83124d3'/>
<id>urn:sha1:dcabe14392a01fe97836fa5c6fb059c4b83124d3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>multi-cursor: render: wip</title>
<updated>2025-08-28T05:30:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-08-28T05:30:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=64f52190ed0bad915d2df62f8b252ab0f3547467'/>
<id>urn:sha1:64f52190ed0bad915d2df62f8b252ab0f3547467</id>
<content type='text'>
Shapes and most color options implemented
</content>
</entry>
<entry>
<title>multi-cursor: render: wip</title>
<updated>2025-08-27T15:08:39Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-08-27T15:08:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=44bc72075520d7c420a000f25b40a2e6775cbc6d'/>
<id>urn:sha1:44bc72075520d7c420a000f25b40a2e6775cbc6d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>multi-cursor: wip: render extra cursors</title>
<updated>2025-08-27T13:00:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-08-27T13:00:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d5e99862afd2802993339953210ddb2dd8baf62b'/>
<id>urn:sha1:d5e99862afd2802993339953210ddb2dd8baf62b</id>
<content type='text'>
Currently ignores custom shapes and colors (i.e. all extra cursors are
rendered exactly as the primary cursor).
</content>
</entry>
<entry>
<title>multi-cursor: wip: track cursor shapes and colors</title>
<updated>2025-08-27T11:43:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-08-27T11:43:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=beb4556dc0e8a3c8c6febfb5dc832895098c7e4f'/>
<id>urn:sha1:beb4556dc0e8a3c8c6febfb5dc832895098c7e4f</id>
<content type='text'>
And erase all extra cursors on reset, resize and clear
screen/scrollback (ED 2/3).
</content>
</entry>
<entry>
<title>quirks: remove subsurface unmap quirk for Sway</title>
<updated>2025-06-09T05:08:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-06-09T05:08:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7347f4beb1314df12e834a260f18feae8b775a5a'/>
<id>urn:sha1:7347f4beb1314df12e834a260f18feae8b775a5a</id>
<content type='text'>
Sway used to have an issue where unmapping a subsurface did not damage
the surface below (https://github.com/swaywm/sway/issues/6960).

This has been fixed for quite some time now, so let's remove the
quirk.
</content>
</entry>
<entry>
<title>conf: pad: add center-when-fullscreen and center-when-maximized-and-fullscreen</title>
<updated>2025-05-24T07:56:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-23T06:38:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5a84f8d841d09e9aa91befbbb8e8b634b7f8959a'/>
<id>urn:sha1:5a84f8d841d09e9aa91befbbb8e8b634b7f8959a</id>
<content type='text'>
Before this patch, the grid content was *always* centered when the
window was maximized or fullscreened, regardless of how the user had
configured padding.

Now, the behavior is controlled by the 'pad' option. Before this
patch, the syntax was

    pad MxN [center]

Now it is

    pad MxN [center|center-when-fullscreen|center-when-maximized-and-fullscreen]

The default is "pad 0x0 center-when-maximized-and-fullscreen", to
match current behavior.

Closes #2111
</content>
</entry>
<entry>
<title>cursor-shape: add 'dnd-ask' and 'all-resize'</title>
<updated>2025-05-22T04:59:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-21T13:25:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=664cdcc65cf42ab269ea4a2c4962c3ee65d7e92f'/>
<id>urn:sha1:664cdcc65cf42ab269ea4a2c4962c3ee65d7e92f</id>
<content type='text'>
These (non-css) cursor shapes were added to the cursor-shape-v1
protocol in wayland-protocols 1.42.

We don't need (or use them at all) internally, but add them to the
list we use to translate from shape names to shape enums. This allows
users to set a custom shape (via OSC-22), while still using server
side cursors (i.e. no need to fallback to client-side cursors).

If we try to set a shape not implemented by the server, we get a
protocol error and foot exits. This is bad.

So, make sure we don't do that:

1. First, we need to explicitly bind v2 if implemented by the server
2. Track the bound version number in the wayland struct
3. When matching shape enum, skip shapes not supported in the
   currently bound version of the cursor-shape protocol
</content>
</entry>
<entry>
<title>render: improve CSD button positioning</title>
<updated>2025-05-21T05:39:35Z</updated>
<author>
<name>Kirill Primak</name>
<email>vyivel@eclair.cafe</email>
</author>
<published>2025-05-20T12:01:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=456ac5d79f46a670479fcdaa75df0942a1571c78'/>
<id>urn:sha1:456ac5d79f46a670479fcdaa75df0942a1571c78</id>
<content type='text'>
This commit fixes titlebar button positioning when maximization isn't
available but minimization is.
</content>
</entry>
<entry>
<title>render: refactor to allow setting only selection bg or fg</title>
<updated>2025-05-05T11:02:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-05T10:43:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=073b637d4535cd0dfe92ca1ce954b552ae9f1a4a'/>
<id>urn:sha1:073b637d4535cd0dfe92ca1ce954b552ae9f1a4a</id>
<content type='text'>
Before this, we only applied custom selection colors, if *both* the
selection bg and fg had been set.

Since the options are already split up into two separate options, and
since it makes sense to at least be able to keep the foreground colors
unchanged (i.e. only setting the selection background), let's allow
only having one of the selection colors set.

Closes #1846
</content>
</entry>
<entry>
<title>config: tweak.surface-bit-depth now defaults to 'auto'</title>
<updated>2025-05-01T06:54:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-01T06:34:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e5a0755451b736c635be58764799ef8d7b536e8d'/>
<id>urn:sha1:e5a0755451b736c635be58764799ef8d7b536e8d</id>
<content type='text'>
When set to 'auto', use 10-bit surfaces if gamma-correct blending is
enabled, and 8-bit surfaces otherwise.

Note that we may still fallback to 8-bit surfaces (without disabling
gamma-correct blending) if the compositor does not support 10-bit
surfaces.

Closes #2082
</content>
</entry>
<entry>
<title>config: gamma-correct-blending: disable by default</title>
<updated>2025-05-01T06:09:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-01T06:09:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b07ce56321404a34fc02635ecf4d5b63ddddf1ea'/>
<id>urn:sha1:b07ce56321404a34fc02635ecf4d5b63ddddf1ea</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: regression: alpha applied to inversed text/selections</title>
<updated>2025-04-25T17:20:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-25T17:20:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cb1b7ba0c5752eeb92c72a80640fbd1f09ad4b7d'/>
<id>urn:sha1:cb1b7ba0c5752eeb92c72a80640fbd1f09ad4b7d</id>
<content type='text'>
Introduced by 5f83278afd0530c323d4192e1095b3d1dea644c9

Closes #2073
</content>
</entry>
<entry>
<title>render: fix colors.alpha-mode=matching</title>
<updated>2025-04-19T11:33:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-19T05:46:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1a2e5f4932a17c9804ca6d201b7d8cf84d7f19d9'/>
<id>urn:sha1:1a2e5f4932a17c9804ca6d201b7d8cf84d7f19d9</id>
<content type='text'>
Before this patch, it only matched RGB color sources. It did not match
the default bg color, or indexed colors. That is, e.g. CSI 43m didn't
apply alpha, even if the color3 matched the default background color.
</content>
</entry>
</feed>
