<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/wayland.c, branch 1.21.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.21.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.21.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2025-03-13T12:28:34Z</updated>
<entry>
<title>meson: require wayland-protocols &gt;= 1.41</title>
<updated>2025-03-13T12:28:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-03-12T16:53:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d48a1c53f59e8b7c99c18f4e4a5693ca0b10bd52'/>
<id>urn:sha1:d48a1c53f59e8b7c99c18f4e4a5693ca0b10bd52</id>
<content type='text'>
</content>
</entry>
<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>Add support for the new Wayland protocol xdg-system-bell</title>
<updated>2025-01-17T09:21:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-17T09:10:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2a07a2e6b9a9565287996c51ceb2824b37d3fba7'/>
<id>urn:sha1:2a07a2e6b9a9565287996c51ceb2824b37d3fba7</id>
<content type='text'>
From the release notes:

    system bell - allowing e.g. terminal emulators to hand off system
    bell alerts to the compositor for among other things accessibility
    purposes

The new protocol is used when the new config option
bell.system=yes (and the compositor implements the protocol,
obviously).

The system bell is rung independent of whether the foot window has
keyboard focus or not (thus relying on compositor configuration to
determine whether anything should be done or not in response to the
bell).

The new option is enabled by default.
</content>
</entry>
<entry>
<title>main: include toplevel-icon support in --version output</title>
<updated>2024-09-13T07:04:18Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-13T06:45:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c6208a98c80f4b945608b4ce1bd6f35fab5b56d8'/>
<id>urn:sha1:c6208a98c80f4b945608b4ce1bd6f35fab5b56d8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>toplevel-icon: set to app-id, instead of hardcoding to "foot"</title>
<updated>2024-09-13T07:04:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-08T16:25:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b34137dde3bd40b5a116b4d8f86196027fc11d3f'/>
<id>urn:sha1:b34137dde3bd40b5a116b4d8f86196027fc11d3f</id>
<content type='text'>
And, special case "footclient", and map it to "foot".
</content>
</entry>
<entry>
<title>wayland: set toplevel icon</title>
<updated>2024-09-13T07:04:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-08T11:15:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0cb07027f2f1e5035cc009140084128d35995c54'/>
<id>urn:sha1:0cb07027f2f1e5035cc009140084128d35995c54</id>
<content type='text'>
If the xdg-toplevel-icon-v1 protocol is available, and we have the
corresponding manager global, set the toplevel icon to "foot".

Note: we do *not* provide any pixel data. This is by design; we want
to keep things simple.

To be able to provide pixel data, we would have to either:

* embed the raw pixel data in the foot binary
* link against either libpng or/and e.g. nanosvg, locate, at run-time,
  the paths to our own icons, and load them at run-time.
* link against either libpng or/and e.g. nanosvg, and, at run-time, do
  a full icon lookup. This would also require us to add a config option
  for which icon theme to use.

Of the two, I would prefer the first option. But, let's skip this
completely for now.

By providing the icon as a name, the compositor will have to lookup
the icon itself. Compositors supporting icons is likely to already
support this.

So what do we gain by implementing this protocol? Compositors no
longer has to parse .desktop files and map our app-id to find the icon
to use.

There's one question remaining. With this patch, the icon name is
hardcoded to "foot", just like our .desktop files. But, perhaps we
should use the app-id instead? And if so, should we also change the
icon when the app-id changes?

My gut feeling is, yes, we should use the app-id instead, and yes, we
should update the icon when the app-id is changed at run-time.
</content>
</entry>
<entry>
<title>wayland: bind the xdg-toplevel-icon manager global</title>
<updated>2024-09-13T07:04:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-08T09:18:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=28a1c67dd5ecc917ebd69c0552a1ed99165c310f'/>
<id>urn:sha1:28a1c67dd5ecc917ebd69c0552a1ed99165c310f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: add wayl_activate()</title>
<updated>2024-07-23T05:17:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-07-23T04:58:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=69f56b86b7ad30a028917121783ea51e9fe9c3a3'/>
<id>urn:sha1:69f56b86b7ad30a028917121783ea51e9fe9c3a3</id>
<content type='text'>
wayl_activate() takes an XDG activation token and does an XDG
activation request.
</content>
</entry>
<entry>
<title>wayland: #ifdef guard code related to wl_shm_release()</title>
<updated>2024-07-18T12:27:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-07-18T12:27:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e11a4ab6af29cb841feaf2cf4785cfd1a3d709fd'/>
<id>urn:sha1:e11a4ab6af29cb841feaf2cf4785cfd1a3d709fd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: use wl_shm v2 if available</title>
<updated>2024-07-18T06:23:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-07-18T06:07:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4f25e1ba9ff136ed237a0c4632c11a65b537cbb2'/>
<id>urn:sha1:4f25e1ba9ff136ed237a0c4632c11a65b537cbb2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: don't reset the XKB compose state in keymap()</title>
<updated>2024-06-22T06:00:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-06-22T05:58:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c45231ef89faeee0674e405e94ef6a92eb6726a0'/>
<id>urn:sha1:c45231ef89faeee0674e405e94ef6a92eb6726a0</id>
<content type='text'>
When the compositor sends a new keymap, don't reset the XKB compose
state.

This is done by initializing the XKB context, along with the compose
state, when binding the seat, instead of in keymap().

Then, in keymap(), simply stop destroying the old xkb state. Only
destroy, and re-create the keymap state.

Closes #1744
</content>
</entry>
<entry>
<title>input: implement wl_pointer::axis_value120()</title>
<updated>2024-06-18T12:09:03Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-06-15T08:17:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=aea16ba5d2896ef22bf0bea45e5e8142c0ff1c2a'/>
<id>urn:sha1:aea16ba5d2896ef22bf0bea45e5e8142c0ff1c2a</id>
<content type='text'>
This implements high resolution mouse wheel scroll events. A "normal"
scroll step corresponds to the value 120. Anything less than that is a
partial scroll step.

This event replaces axis_discrete(), when we bind wl_seat v8 (which we
now do, when available).

We calculate the number of degrees that is required to scroll a single
line, based off of the scrollback.multiplier value.

Each high-res event accumulates, until we have at least the number of
degress required to scroll one, or more lines.

The remaining degrees are kept, and added to in the next scroll event.

Closes #1738
</content>
</entry>
<entry>
<title>render: use single-pixel buffers for overlays, when possible</title>
<updated>2024-05-22T11:48:46Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-05-21T14:09:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3c96d0b68e3f3d270e885c4d7bb82ae8667ba385'/>
<id>urn:sha1:3c96d0b68e3f3d270e885c4d7bb82ae8667ba385</id>
<content type='text'>
The unicode-mode, and flash overlays are single color buffers. This
means we can use the single-pixel buffer protocol.

It's undefined whether the compositor will release the buffer or not;
to make things easier, simply destroy the buffer as soon as we've
committed it.

Note that since compositors don't necessarily release single-pixel
buffers, we can't plug them into our own buffer interface. This means
we can't use buffer pointers to check if we can re-use the previous
buffer (i.e. we can skip comitting a new buffer), or if we have to
create a new one.

It's _almost_ enough to just check if the last overlay style is the
same as the current one. Except that that doesn't take window resizes
into account...
</content>
</entry>
<entry>
<title>wayland: remove has_wl_compositor_v6</title>
<updated>2024-04-12T13:35:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-04-12T13:35:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e753bb953bdf2a30d79d637aafa64cf3fdd2f7d4'/>
<id>urn:sha1:e753bb953bdf2a30d79d637aafa64cf3fdd2f7d4</id>
<content type='text'>
We deviate slightly from the specification, in that we don't assume a
preferred buffer scale of 1. Instead, we "guess" the scale *until we
receive a surface_preferred_buffer_scale event.

Because of this, we don't need the has_wl_compositor_v6 member, as
it's enough to check if we have a non-zero 'preferred buffer scale'.
</content>
</entry>
<entry>
<title>wayland: only use the surface preferred scale if set by the compositor</title>
<updated>2024-04-05T14:19:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-04-05T14:19:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=88a3b54ca3d0732db8a89b62d3373c66c970327f'/>
<id>urn:sha1:88a3b54ca3d0732db8a89b62d3373c66c970327f</id>
<content type='text'>
Before this patch, we would, in some cases, fallback to the surface
preferred (not fractional) scaling, even though the compositor hadn't
actually published a preferred buffer scale; the presence of a v6
compositor interface doesn't mean we've actually received a preferred
scale yet.
</content>
</entry>
<entry>
<title>wayland: skip loading cursor theme when using server side cursors</title>
<updated>2024-03-16T14:36:44Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-03-16T14:30:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=578765ad8358b74949ad1296703aec4dec7d004a'/>
<id>urn:sha1:578765ad8358b74949ad1296703aec4dec7d004a</id>
<content type='text'>
We don't need the client side cursor theme when using server side
cursors.
</content>
</entry>
<entry>
<title>shm: use XRGB surfaces when we know we wont be using transparency</title>
<updated>2024-02-21T15:29:10Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-21T15:29:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=67f97cbca1d9c1396537d0f04afb5a336ac46855'/>
<id>urn:sha1:67f97cbca1d9c1396537d0f04afb5a336ac46855</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: regression: use correct scaling factor when calling render_resize()</title>
<updated>2024-02-07T15:22:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-07T15:22:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bc8c2e01124eea4911df9750583bac11160d4d2c'/>
<id>urn:sha1:bc8c2e01124eea4911df9750583bac11160d4d2c</id>
<content type='text'>
When an output property (such as scaling factor) has changed, we need
to call render_resize() to ensure the window surface is correct (for
example, we may have to change its scale).

The width/height parameters are in *logical* pixels (i.e. already
scaled). For render_resize() to work correctly when the scale is being
changed, it needs to be called with *current* logical size. This means
we need to scale our current width/height using the *old* scaling
factor.
</content>
</entry>
<entry>
<title>Don't use fancy Unicode quotes, stick to ASCII</title>
<updated>2024-02-06T11:36:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-06T11:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7999975016a57cc0a2c2e20bc55f29de32df7044'/>
<id>urn:sha1:7999975016a57cc0a2c2e20bc55f29de32df7044</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feature: add resize-by-cells option to constrain window sizes...</title>
<updated>2024-02-05T11:14:53Z</updated>
<author>
<name>Andrew J. Hesford</name>
<email>ajh@sideband.org</email>
</author>
<published>2024-01-17T20:00:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=21a8d832ce12217ddd493cdcaefdc457128f2ada'/>
<id>urn:sha1:21a8d832ce12217ddd493cdcaefdc457128f2ada</id>
<content type='text'>
...to multiples of the cell size, and preserve grid size when changing
fonts or display scales in floating windows.
</content>
</entry>
</feed>
