<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/quirks.c, branch 1.22.3</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.22.3</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.22.3'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2025-03-05T17:45:01Z</updated>
<entry>
<title>render: gamma-correct blending</title>
<updated>2025-03-05T17:45:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-21T10:01:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ccf625b9914917e131beb83379c526bab1927edc'/>
<id>urn:sha1:ccf625b9914917e131beb83379c526bab1927edc</id>
<content type='text'>
This implements gamma-correct blending, which mainly affects font
rendering.

The implementation requires compile-time availability of the new
color-management protocol (available in wayland-protocols &gt;= 1.41),
and run-time support for the same in the compositor (specifically, the
EXT_LINEAR TF function and sRGB primaries).

How it works: all colors are decoded from sRGB to linear (using a
lookup table, generated in the exact same way pixman generates it's
internal conversion tables) before being used by pixman. The resulting
image buffer is thus in decoded/linear format. We use the
color-management protocol to inform the compositor of this, by tagging
the wayland surfaces with the 'ext_linear' image attribute.

Sixes: all colors are sRGB internally, and decoded to linear before
being used in any sixels. Thus, the image buffers will contain linear
colors. This is important, since otherwise there would be a
decode/encode penalty every time a sixel is blended to the grid.

Emojis: we require fcft &gt;= 3.2, which adds support for sRGB decoding
color glyphs. Meaning, the emoji pixman surfaces can be blended
directly to the grid, just like sixels.

Gamma-correct blending is enabled by default *when the compositor
supports it*. There's a new option to explicitly enable/disable it:
gamma-correct-blending=no|yes. If set to 'yes', and the compositor
does not implement the required color-management features, warning
logs are emitted.

There's a loss of precision when storing linear pixels in 8-bit
channels. For this reason, this patch also adds supports for 10-bit
surfaces. For now, this is disabled by default since such surfaces
only have 2 bits for alpha. It can be enabled with
tweak.surface-bit-depth=10-bit.

Perhaps, in the future, we can enable it by default if:

* gamma-correct blending is enabled
* the user has not enabled a transparent background
</content>
</entry>
<entry>
<title>wayland: refactor: wrap wl_surface pointers in a wayl_surface struct</title>
<updated>2023-06-29T13:38:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-26T14:10:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ba46a039aca734bb284c22ba5d5bddf5407e3848'/>
<id>urn:sha1:ba46a039aca734bb284c22ba5d5bddf5407e3848</id>
<content type='text'>
And add a viewport object to accompany the surface (to be used when
scaling the surface).

Also rename the wl_surf_subsurf struct to wayl_sub_surface, and add a
wayl_surface object to it, rather than a plain wl_surface pointer (to
also get the viewport pointer).
</content>
</entry>
<entry>
<title>quirks: sway does not damage surface beneath sub-surface, when unmapped</title>
<updated>2023-05-12T12:51:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-04-25T19:33:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3b41379be43a21a00a776d0d136c5d1b2fe4007e'/>
<id>urn:sha1:3b41379be43a21a00a776d0d136c5d1b2fe4007e</id>
<content type='text'>
When unmapping a sub-surface, Sway &lt;= 1.8 does not damage the surface
beneath the sub-surface.

https://github.com/swaywm/sway/issues/6960

The workaround is to manually damage the main surface. Previously,
this was done when exiting scrollback search, and after the ‘flash’
OSC. But other sub-surfaces, that may also be unmapped, did not.

This patch adds a quirk handler that does this, and calls it when:

* Exiting scrollback search
* Ending the ‘flash’ OSC
* Exiting unicode input mode
* Clearing URL labels
* Removing the scrollback position indicator

Closes #1335
</content>
</entry>
<entry>
<title>wayland: apply CSD/SSD changes in the surface configure event</title>
<updated>2021-06-23T10:37:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-22T16:58:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2a83202fddc4423fd102b0d5f19b0b445301a88e'/>
<id>urn:sha1:2a83202fddc4423fd102b0d5f19b0b445301a88e</id>
<content type='text'>
    The configure event asks the client to change its decoration
    mode. The configured state should not be applied immediately.
    Clients must send an ack_configure in response to this event.
    See xdg_surface.configure and xdg_surface.ack_configure for
    details.

In particular, ”the configured state should *not* be applied
immediately”.

Instead, treat CSD/SSD changes like all other window dimension related
changes: store the to-be mode in win-&gt;configure, and apply it in the
surface configure event.

This fixes an issue where foot incorrectly resized the window when the
server switched between CSD/SSD at run-time.
</content>
</entry>
<entry>
<title>quirk: remove plasma/kwin quirk</title>
<updated>2021-05-12T18:08:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-11T15:39:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=29776dbd1f9fb69aa4a660cceb1b306e1e4235eb'/>
<id>urn:sha1:29776dbd1f9fb69aa4a660cceb1b306e1e4235eb</id>
<content type='text'>
Older version of Plasma/KWin had an issue where buffer damage recorded
before the buffer was attached were ignored. This appears to have been
fixed now.
</content>
</entry>
<entry>
<title>csd: use wayl_win_subsurface_new/destroy()</title>
<updated>2021-02-17T20:48:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-12T10:39:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=587f04f2e1fd432993cecf75fe4ffd23c9b2b243'/>
<id>urn:sha1:587f04f2e1fd432993cecf75fe4ffd23c9b2b243</id>
<content type='text'>
</content>
</entry>
<entry>
<title>util.h: new header file defining commonly used macros</title>
<updated>2020-05-01T09:46:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T09:46:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=69c3e744983e37662fa7b4f61482fb1d142e257c'/>
<id>urn:sha1:69c3e744983e37662fa7b4f61482fb1d142e257c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>quirks: add KDE quirk: surface must be damaged *after* being attached</title>
<updated>2020-03-24T16:44:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-24T16:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b42709525c136a68f08ca7c2bb9dc98e94257ab3'/>
<id>urn:sha1:b42709525c136a68f08ca7c2bb9dc98e94257ab3</id>
<content type='text'>
KDE resets all surface damage when a buffer is attached. Add a quirk
that adds a full-buffer damage to the surface. This quirk is intended
to be called after attaching a buffer to a surface.
</content>
</entry>
<entry>
<title>quirks: weston_csd_{on,off}: don't do anything in fullscreen mode</title>
<updated>2020-03-12T08:39:53Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-12T08:31:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=51a9ff6b04896023dd5d6a4f40ec4395ab82de71'/>
<id>urn:sha1:51a9ff6b04896023dd5d6a4f40ec4395ab82de71</id>
<content type='text'>
</content>
</entry>
<entry>
<title>quirks: add shortcut for flipping all CSD surfaces sync/desync state</title>
<updated>2020-03-03T17:20:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-03T17:19:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e077290c56022255a986c0560f4d496a29bab55e'/>
<id>urn:sha1:e077290c56022255a986c0560f4d496a29bab55e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>quirks: log when applying weston sub-surface desync quirk</title>
<updated>2020-03-02T17:47:04Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-02T17:47:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b268b69a7b5633af58107d625b51b61023f0f824'/>
<id>urn:sha1:b268b69a7b5633af58107d625b51b61023f0f824</id>
<content type='text'>
</content>
</entry>
<entry>
<title>search: enable/disable weston sub-surface desync quirk when rendering search box</title>
<updated>2020-03-01T12:06:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-01T12:06:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b6f8a2e422fe05c1c1e63d39f72857d4c480bc7c'/>
<id>urn:sha1:b6f8a2e422fe05c1c1e63d39f72857d4c480bc7c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: search: mark visible portion of sub-surface opaque</title>
<updated>2020-03-01T11:54:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-01T11:54:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b8d79c719b77fb1e9f958353c62aea09d592067b'/>
<id>urn:sha1:b8d79c719b77fb1e9f958353c62aea09d592067b</id>
<content type='text'>
</content>
</entry>
</feed>
