<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/terminal.c, branch 1.17.2</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.17.2</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.17.2'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2024-04-17T07:14:52Z</updated>
<entry>
<title>term: stash last known DPI, and use after a unmapped/mapped sequence</title>
<updated>2024-04-17T07:14:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-04-17T06:35:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7c20fb247c977fe545b1ef0ce9d8935b0424bf70'/>
<id>urn:sha1:7c20fb247c977fe545b1ef0ce9d8935b0424bf70</id>
<content type='text'>
A compositor may unmap, and then remap the window, for example when
the window is minimized, or if the user switches workspace.

With DPI aware rendering, we *need* to know on which output we're
mapped, in order to use the correct DPI. This means the first frame we
render, before being mapped, always guesses the DPI.

In an unmap/map sequence, guessing the wrong DPI means the window will
flicker.

Fix by stashing the last used DPI value, and use that instead of
guessing.

This means the *only* time we _actually_ guess the DPI, is the very
first frame, when starting up foot.
</content>
</entry>
<entry>
<title>term: don't print outside grid when printing multi-column characters</title>
<updated>2024-04-15T14:03:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-04-15T14:03:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=71ce17d97795419c3fe5d28132e387f27e2ca958'/>
<id>urn:sha1:71ce17d97795419c3fe5d28132e387f27e2ca958</id>
<content type='text'>
When auto-wrap is disabled, a multi-column character may be printed on
a line that doesn't fit the entire character. That is, the "spacers"
we print, as place holders in the columns after the first one, may
reach outside the grid.

We did (try to) check for this, but the check was off by one. Meaning,
we could, in some cases, print outside the grid.
</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>term: send SIGHUP before SIGTERM when shutting down</title>
<updated>2024-04-05T17:34:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-04-05T14:27:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7f4328e0b1d5e47aa096c0d3cd8bfea143f80a91'/>
<id>urn:sha1:7f4328e0b1d5e47aa096c0d3cd8bfea143f80a91</id>
<content type='text'>
If we're the ones initiating shutdown, start by sending SIGHUP. Only
if the client application does not terminate, send SIGTERM (and if it
still refuses to terminate, send SIGKILL).

Also reduce the timeout between the signals from 60s to 30s.
</content>
</entry>
<entry>
<title>term: don't shutdown terminal when PTY is closed, unless --pty was used</title>
<updated>2024-04-05T16:45:31Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-04-05T14:22:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c7848c4e75c3cb5704378137c5b5c989135f81b1'/>
<id>urn:sha1:c7848c4e75c3cb5704378137c5b5c989135f81b1</id>
<content type='text'>
Unless --pty has been used, we do *not* want to shutdown the terminal
when the PTY is closed by the client application; we want to wait for
the client application to actually terminate.

This was the behavior before the --pty patch.

This was changed in the --pty patch, since then, we don't *have* a
client application. That is, foot has not forked+exec:ed anything. The
only way to trigger a shutdown (from the client side) is to close the
PTY.

This patch restores the old behavior, when --pty is *not* used.

Closes #1666
</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>xmalloc: add xmemdup() and use to replace some uses of xmalloc+memcpy</title>
<updated>2024-03-17T11:31:02Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2024-03-16T20:28:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e8b04e0e2c9e8a4f825193b907d04c3b3165a842'/>
<id>urn:sha1:e8b04e0e2c9e8a4f825193b907d04c3b3165a842</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add support for opening an existing PTY</title>
<updated>2024-03-14T06:31:03Z</updated>
<author>
<name>Alyssa Ross</name>
<email>hi@alyssa.is</email>
</author>
<published>2021-12-10T17:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=86894a1cd29f8fb3e5a8487b4ce2d2c1b4cf57a9'/>
<id>urn:sha1:86894a1cd29f8fb3e5a8487b4ce2d2c1b4cf57a9</id>
<content type='text'>
Virtual machine monitor programs (e.g. QEMU, Cloud Hypervisor) expose
guest consoles as PTYs.  With this patch, foot can access these guest
consoles.

Usually, the program used for accessing these PTYs is screen, but
screen is barely developed, doesn't support resizing, and has a bunch
of other unrelated stuff going on.  It would be nice to have a
terminal emulator that properly supported opening an existing PTY.
The VMM controls the master end of the PTY, so to the other end (in
this case foot), it just behaves like any application running in a
directly-opened PTY, and all that's needed is to change foot's code to
support opening an existing PTY rather than creating one.

Co-authored-by: tanto &lt;tanto@ccc.ac&gt;
</content>
</entry>
<entry>
<title>term_fill(): no need to set attrs.clean = 0</title>
<updated>2024-03-07T15:25:04Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-28T16:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8d7ab86182c1439e9aa4c436f0ceebe77c7d05a9'/>
<id>urn:sha1:8d7ab86182c1439e9aa4c436f0ceebe77c7d05a9</id>
<content type='text'>
The VT state’s attribute is always 0
</content>
</entry>
<entry>
<title>term_fill(): change ‘character’ parameter from char -&gt; uint8_t</title>
<updated>2024-03-07T15:24:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-26T15:13:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=23908d9277b3c41c294102993875cf485db689cb'/>
<id>urn:sha1:23908d9277b3c41c294102993875cf485db689cb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term_fill(): make sure the filled cells have their ‘clean’ bit reset</title>
<updated>2024-03-07T15:24:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-26T15:08:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1b13deff048fc10620b26ffe0220fae15549f9b4'/>
<id>urn:sha1:1b13deff048fc10620b26ffe0220fae15549f9b4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: modify term_fill() to optionally reset the SGR attributes</title>
<updated>2024-03-07T15:24:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-26T15:05:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b3a84ba71b021b484e0ddc023480eb6d9f885991'/>
<id>urn:sha1:b3a84ba71b021b484e0ddc023480eb6d9f885991</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: replace term_put_char() with term_fill()</title>
<updated>2024-03-07T15:24:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-26T14:59:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=189cfd717fd4670a97995ad9b8e08a2352c09099'/>
<id>urn:sha1:189cfd717fd4670a97995ad9b8e08a2352c09099</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: codespell: limitiations -&gt; limitations</title>
<updated>2024-03-07T15:24:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-26T14:09:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=df5dd94789291290489e7e875dd7f7862aa6dc35'/>
<id>urn:sha1:df5dd94789291290489e7e875dd7f7862aa6dc35</id>
<content type='text'>
</content>
</entry>
<entry>
<title>put_char fixup</title>
<updated>2024-03-07T15:24:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-26T14:00:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b30b8a294498ce765698dd40df4a750f8debe689'/>
<id>urn:sha1:b30b8a294498ce765698dd40df4a750f8debe689</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: print: spacers may be printed all the way up to the last column</title>
<updated>2024-03-07T15:24:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-26T13:35:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e6c372b14fa76799ea3c3ff89258a1b905cc9ec0'/>
<id>urn:sha1:e6c372b14fa76799ea3c3ff89258a1b905cc9ec0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: add term_put_char()</title>
<updated>2024-03-07T15:24:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-26T13:34:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ea851962c1f4f1d30e350de3f4aa7bfbea135dcf'/>
<id>urn:sha1:ea851962c1f4f1d30e350de3f4aa7bfbea135dcf</id>
<content type='text'>
This function prints a single, non-double width, character to the
grid. It handles OSC-8 hyperlinks, but does not:

* update the cursor location
* erase sixels
</content>
</entry>
<entry>
<title>term: erase-scrollback: handle non-existing scrollback history</title>
<updated>2024-02-15T15:54:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-15T15:29:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=729bd57caee1cc6fd31419adf8f75ea482c37102'/>
<id>urn:sha1:729bd57caee1cc6fd31419adf8f75ea482c37102</id>
<content type='text'>
If scrollback.lines == 0, and the window size (number of rows) is a
power of two, all rows are always visible. I.e. there is no scrollback
history.

This threw off the scrollback erase logic, causing visible rows to be
erased, and set to NULL. This triggered a crash when trying to update
the view.

Closes #1610
</content>
</entry>
<entry>
<title>osc: add support for osc 176 (app ID)</title>
<updated>2024-02-06T12:50:09Z</updated>
<author>
<name>delthas</name>
<email>delthas@dille.cc</email>
</author>
<published>2023-09-04T12:02:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6c56b04b3f312be8dcee307e29515f3c83b3ae87'/>
<id>urn:sha1:6c56b04b3f312be8dcee307e29515f3c83b3ae87</id>
<content type='text'>
This adds support for a new OSC escape sequence: OSC 176, that lets
terminal programs tell the terminal the name of the app that is
running. foot then sets the app ID of the toplevel to that ID,
which lets the compositor know which app is running, and typically
sets the appropriate icon, window grouping, ...

See: https://gist.github.com/delthas/d451e2cc1573bb2364839849c7117239
</content>
</entry>
<entry>
<title>term: drop term-&gt;render.title.is_armed</title>
<updated>2024-02-06T12:41:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-06T12:41:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4801d3a305e80b449f041d469432780d7b0cc179'/>
<id>urn:sha1:4801d3a305e80b449f041d469432780d7b0cc179</id>
<content type='text'>
This boolean isn't needed. The idea was probably to not re-program the
timer unnecessarily, or even to prevent it from being moved forward in
time indefinitely.

However, the logic has (probably) gone through some changes, that now
makes it irrelevant.

The timer isn't moved forward indefinitely; it is always set to 8ms
from the last title update. The closer we get to that point in time,
the smaller the timeout we set.

Now, is_armed _did_ prevent the timer from being re-programmed. But
that tiny performance tweak isn't really necessary, as the title
should, in normal cases, not be set that often anyway.
</content>
</entry>
</feed>
