<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/wayland.h, branch 1.15.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.15.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.15.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2023-07-05T14:22:28Z</updated>
<entry>
<title>input: add basic support for touchscreen input</title>
<updated>2023-07-05T14:22:28Z</updated>
<author>
<name>CismonX</name>
<email>admin@cismon.net</email>
</author>
<published>2023-07-04T16:19:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d2fcb5343f57c132abec9a21ad89d1505a32c47c'/>
<id>urn:sha1:d2fcb5343f57c132abec9a21ad89d1505a32c47c</id>
<content type='text'>
Closes #517
</content>
</entry>
<entry>
<title>cursor-shape: use server-side cursors for custom (OSC-22), if possible</title>
<updated>2023-07-03T12:36:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-28T11:25:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c2baaff3c1311335b46e75db27bfd79d4f7b623b'/>
<id>urn:sha1:c2baaff3c1311335b46e75db27bfd79d4f7b623b</id>
<content type='text'>
Using a lookup table, try to map the user-provided xcursor string to a
cursor-shape-v1 known shape.

If we succeed, set the user’s custom cursor using server side
cursors (i.e. using cursor-shape-v1).

If not, fallback to trying to load the image ourselves (using
wl_cursor_theme_get_cursor()), and set it using the legacy
wl_pointer_set_cursor().
</content>
</entry>
<entry>
<title>cursor-shape: add support for server side cursor shapes</title>
<updated>2023-07-03T12:36:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-27T15:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c8e13ad3938d68635693d0b0f4bf1054628e8387'/>
<id>urn:sha1:c8e13ad3938d68635693d0b0f4bf1054628e8387</id>
<content type='text'>
This implements support for the new cursor-shape-v1 protocol. When
available, we use it, instead of client-side cursor surfaces, to
select the xcursor shape.

Note that we still need to keep client side pointers, for:

* backward compatibility
* to be able to "hide" the cursor

Closes #1379
</content>
</entry>
<entry>
<title>refactor: track current xcursor using an enum, instead of a char pointer</title>
<updated>2023-07-03T12:36:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-27T14:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ee794a121e4603d01fb662ad6d1f3b18b6937d2c'/>
<id>urn:sha1:ee794a121e4603d01fb662ad6d1f3b18b6937d2c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: use legacy scaling until fractional_scale::preferred_scale() has been called</title>
<updated>2023-06-29T13:38:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-26T19:07:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8f74b1090a6a5297ac7b6710420528ff56ed03d2'/>
<id>urn:sha1:8f74b1090a6a5297ac7b6710420528ff56ed03d2</id>
<content type='text'>
This way, the initial frame is more likely to get scaled correctly;
foot will guess the initial (integer) scale from the available
monitors, and use that. By using legacy scaling, we force the
compositor to down-scale the image to the correct scale factor.

If we use the new fraction scaling method with an integer scaling
factor, the initial frame gets rendered way too big.
</content>
</entry>
<entry>
<title>wayland: refactor: surface_scale(): pass wl_window pointer, instead of wayland global</title>
<updated>2023-06-29T13:38:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-26T19:06:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d71e588800fea0f7b7815cc5ce51ded752070b95'/>
<id>urn:sha1:d71e588800fea0f7b7815cc5ce51ded752070b95</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: refactor: add a buffer argument to wayl_*_scale() functions</title>
<updated>2023-06-29T13:38:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-26T15:05:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5a60bbc119397c2993fc1895bae75c2c1e69fe1d'/>
<id>urn:sha1:5a60bbc119397c2993fc1895bae75c2c1e69fe1d</id>
<content type='text'>
This will be needed later, when using fractional scaling + viewporter
to scale.
</content>
</entry>
<entry>
<title>wayland: refactor: wayl_surface_scale(): pass wayl_surface pointer</title>
<updated>2023-06-29T13:38:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-26T14:53:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=434fd6aa1f4a21ef6572a772ec891eeb2006a82c'/>
<id>urn:sha1:434fd6aa1f4a21ef6572a772ec891eeb2006a82c</id>
<content type='text'>
Instead of passing a raw wl_surface pointer, pass a wayl_surface
pointer.

This is needed later, when using fractional scaling to scale the
surface (since then we need the surface’s viewport object).
</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>wayland: add viewport object to sub-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-26T13:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c5d533ec71aafe1c842189a7e662f7a7696c56a9'/>
<id>urn:sha1:c5d533ec71aafe1c842189a7e662f7a7696c56a9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: add wayl_surface_scale(), and wayl_win_scale()</title>
<updated>2023-06-29T13:38:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-26T13:51:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0a5073f5703e89cfa4219d5b532cb134f9def6d5'/>
<id>urn:sha1:0a5073f5703e89cfa4219d5b532cb134f9def6d5</id>
<content type='text'>
These functions scale a surface+buffer.

For now, only using the legacy scaling
method (wl_surface_set_buffer_scale()).
</content>
</entry>
<entry>
<title>wayland: add wayl_fractional_scaling()</title>
<updated>2023-06-29T13:38:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-22T13:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=913ae94cf99cb4a171ea69e6340b804a0e8c6a37'/>
<id>urn:sha1:913ae94cf99cb4a171ea69e6340b804a0e8c6a37</id>
<content type='text'>
Returns true if fractional scaling is available.
</content>
</entry>
<entry>
<title>wayland: pointer.scale: convert to float</title>
<updated>2023-06-29T13:38:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-22T12:23:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6e2a47287aa5160134a8bb75f562af5c85f3aaf2'/>
<id>urn:sha1:6e2a47287aa5160134a8bb75f562af5c85f3aaf2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: plumbing for wp-fractional-scale</title>
<updated>2023-06-29T13:38:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-03-08T09:44:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a9ecf1449e731c2461ced75cc9c16247523aca47'/>
<id>urn:sha1:a9ecf1449e731c2461ced75cc9c16247523aca47</id>
<content type='text'>
* Bind the wp-viewporter and wp-fractional-scale-manager globals.
* Create a viewport and fractional-scale when instantiating a window.
* Add fractional-scale listener (that does nothing at the moment).
* Destroy everything on teardown.
</content>
</entry>
<entry>
<title>osc: update font subpixel mode, and window opaque compositor hint, on alpha changes</title>
<updated>2023-05-26T08:01:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-05-25T16:39:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c51050a9bc16b231de964156cd3ffd20ee12569e'/>
<id>urn:sha1:c51050a9bc16b231de964156cd3ffd20ee12569e</id>
<content type='text'>
When background alpha is changed at runtime (using OSC-11), we (may)
have to update the opaque hint we send to the compositor.

We must also update the subpixel mode used when rendering font
glyphs.

Why?

When the window is fully opaque, we use wl_surface_set_opaque_region()
on the entire surface, to hint to the compositor that it doesn’t have
to blend the window content with whatever is behind the
window. Obviously, if alpha is changed from opaque, to transparent (or
semi-transparent), that hint must be removed.

Sub-pixel mode is harder to explain, but in short, we can’t do
subpixel hinting with a (semi-)transparent background. Thus, similar
to the opaque hint, subpixel antialiasing must be enabled/disabled
when background alpha is changed.
</content>
</entry>
<entry>
<title>wayland: ignore configure events for unmapped surfaces</title>
<updated>2023-02-25T08:22:20Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-12-29T10:32:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7f26914583a0114e102e4596763302a5bc6d1730'/>
<id>urn:sha1:7f26914583a0114e102e4596763302a5bc6d1730</id>
<content type='text'>
Closes #1249

Note that it is still unclear whether ack:ing a configure event for an
unmapped surface is a protocol violation, or something that should be
handled by the compositor.

According to
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/108,
Kwin, Mutter and Weston handles it, while wlroots does not.
</content>
</entry>
<entry>
<title>Add support for xdg_toplevel.wm_capabilities</title>
<updated>2022-08-04T12:23:03Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2022-05-06T18:05:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=129e1a9b8e23007026d19c970941ccbc8ee2f0ca'/>
<id>urn:sha1:129e1a9b8e23007026d19c970941ccbc8ee2f0ca</id>
<content type='text'>
See https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/122
</content>
</entry>
<entry>
<title>input: add new Unicode input mode</title>
<updated>2022-07-29T07:26:31Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-07-28T16:09:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8967dd9cfe51276d63ef8ff64e8fc76f80a6fa3d'/>
<id>urn:sha1:8967dd9cfe51276d63ef8ff64e8fc76f80a6fa3d</id>
<content type='text'>
This mode is activated through the new key-bindings.unicode-input and
search-bindings.unicode-input key bindings.

When active, the user can “build” a Unicode codepoint by typing its
hexadecimal value.

Note that there’s no visual feedback in this mode. This is
intentional. This mode is intended to be a fallback for users that
don’t use an IME.

Closes #1116
</content>
</entry>
<entry>
<title>ime: track IME focus independently from keyboard focus</title>
<updated>2022-06-15T17:25:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-06-15T16:41:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=96f23b4c6436d314ae4272f5f99c51b8e33556eb'/>
<id>urn:sha1:96f23b4c6436d314ae4272f5f99c51b8e33556eb</id>
<content type='text'>
Replace the seat-&gt;ime.focused boolean with a terminal instace pointer,
seat-&gt;ime_focus.

Set and reset this on ime::enter() and ime::leave() events, and use
this instead of seat-&gt;kbd_focus on all other IME events.

This fixes two issues:

a) buggy compositors that sometimes sends an IME enter event without
  first having sent a keyboard enter event.

b) seats may be IME capable while still lacking the keyboard
  capability. Such seats will *always* see IME enter events without a
  corresponding keyboard enter event.
</content>
</entry>
<entry>
<title>wayland: throttle xdg activation token requests for window urgency</title>
<updated>2022-05-11T19:17:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-05-11T19:17:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=200c5cbc7913f3c9aca45792669c7ede2d087a47'/>
<id>urn:sha1:200c5cbc7913f3c9aca45792669c7ede2d087a47</id>
<content type='text'>
When XDG activation support was added to URL mode, we introduced a
regression, where it is possible to flood the Wayland socket with XDG
activation token requests.

Start foot with “foot -o bell.urgency=yes”, then run:

  while true; do echo -en ‘\a’; done

Finally, switch keyboard focus to another window. Foot crashes.

Throttle the token requests by limiting the number of outstanding
urgency token requests to 1.

Closes #1065
</content>
</entry>
</feed>
