<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/terminal.h, branch 1.3.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.3.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.3.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2020-05-03T09:31:59Z</updated>
<entry>
<title>unicode-combining: limit maximum number of allowed composed chains</title>
<updated>2020-05-03T09:31:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-03T09:31:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4d4df92f661c6756cffd2ab6bc7983c3f1ced8c2'/>
<id>urn:sha1:4d4df92f661c6756cffd2ab6bc7983c3f1ced8c2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>unicode-combining: store seen combining chains "globally" in the term struct</title>
<updated>2020-05-03T09:03:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-03T09:03:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=62e07743194c8051334ed9b23be90ce31ab80773'/>
<id>urn:sha1:62e07743194c8051334ed9b23be90ce31ab80773</id>
<content type='text'>
Instead of storing combining data per cell, realize that most
combinations are re-occurring and that there's lots of available space
left in the unicode range, and store seen base+combining combinations
chains in a per-terminal array.

When we encounter a combining character, we first try to pre-compose,
like before. If that fails, we then search for the current
base+combining combo in the list of previously seen combinations. If
not found there either, we allocate a new combo and add it to the
list. Regardless, the result is an index into this array. We store
this index, offsetted by COMB_CHARS_LO=0x40000000ul in the cell.

When rendering, we need to check if the cell character is a plain
character, or if it's a composed character (identified by checking if
the cell character is &gt;= COMB_CHARS_LO).

Then we render the grapheme pretty much like before.
</content>
</entry>
<entry>
<title>unicode-combine: remove utf8proc dependency</title>
<updated>2020-05-02T15:29:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-02T15:29:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d945b68b734427a03d114716ff8aeac7998a7c57'/>
<id>urn:sha1:d945b68b734427a03d114716ff8aeac7998a7c57</id>
<content type='text'>
We only used utf8proc to try to pre-compose a glyph from a base and
combining character.

We can do this ourselves by using a pre-compiled table of valid
pre-compositions. This table isn't _that_ big, and binary searching it
is fast.

That is, for a very small amount of code, and not too much extra RO
data, we can get rid of the utf8proc dependency.
</content>
</entry>
<entry>
<title>unicode-combining: pack struct</title>
<updated>2020-05-01T19:47:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T19:47:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4ae0e7c922e1d12b9b50e69e6659f9b453c6c905'/>
<id>urn:sha1:4ae0e7c922e1d12b9b50e69e6659f9b453c6c905</id>
<content type='text'>
</content>
</entry>
<entry>
<title>unicode-combine: leave a note saying we might need more than 2 combining chars</title>
<updated>2020-05-01T18:19:46Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T18:19:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0c7a94dfdc98d46d618060aab8927c24a130fd8f'/>
<id>urn:sha1:0c7a94dfdc98d46d618060aab8927c24a130fd8f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>unicode-combining: completely remove unicode combining characters when feature is disabled</title>
<updated>2020-05-01T10:05:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T10:05:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3474624c2c17058f0fd9f3f1821971e7213d285b'/>
<id>urn:sha1:3474624c2c17058f0fd9f3f1821971e7213d285b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: combining characters: reduce max number of combining characters</title>
<updated>2020-05-01T10:00:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T10:00:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=66e5abdda35d96809ed7fc2a6da6c8d0e827e7d5'/>
<id>urn:sha1:66e5abdda35d96809ed7fc2a6da6c8d0e827e7d5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: render combining characters</title>
<updated>2020-05-01T09:56:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T09:56:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=76567e9ef0945c5ce86bb55097e6112a9b866948'/>
<id>urn:sha1:76567e9ef0945c5ce86bb55097e6112a9b866948</id>
<content type='text'>
This is basically just a loop that renders additional glyphs on top
off the base glyph.

Since we now need access to the row struct, for the combining
characters, the function prototype for 'render_cell()' has changed.

When rendering the combining characters we also need to deal with
broken fonts; some fonts use positive offsets (as if the combining
character was a regular character), while others use a negative
offset (to be used as if you had already advanced the pen position).

We handle both - a positive offset is rendered just like a regular
glyph. When we see a negative offset we simply add the width of a cell
first.
</content>
</entry>
<entry>
<title>grid: add per-cell combining characters</title>
<updated>2020-05-01T09:49:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T09:49:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b2c4115f3e5b36ff04b2f7ff1af4d7bce787a16f'/>
<id>urn:sha1:b2c4115f3e5b36ff04b2f7ff1af4d7bce787a16f</id>
<content type='text'>
The data is *not* added to the cell struct, since that one is too
performance critical.

Instead, the data is added as a separate array in the row struct.

This allows our performance critical code paths that e.g. clear cells
to perform as before.
</content>
</entry>
<entry>
<title>term: don't enable ptmx FDM callback until Wayland window has been configured</title>
<updated>2020-04-30T15:22:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-30T15:22:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fc2e385d876f53b260d1f8d80db2517b9f2e6e80'/>
<id>urn:sha1:fc2e385d876f53b260d1f8d80db2517b9f2e6e80</id>
<content type='text'>
The way things works right now, we cannot enable the ptmx FDM callback
right away. We need to wait for the Wayland window to have been
configured.

Before the window is configured, we don't have a size, and no
grid. Thus, if we try to process ptmx data we'll crash since we have
no where to write it to.

So, registering the ptmx fd with the FDM is now delayed until we've
received the first 'configure' event from Wayland.
</content>
</entry>
<entry>
<title>term: remove unneeded utf8.left member</title>
<updated>2020-04-27T13:06:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-27T13:06:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e478874dd9cefb08011c46d43deb850e68a4458b'/>
<id>urn:sha1:e478874dd9cefb08011c46d43deb850e68a4458b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>damage: remove 'scroll' sub struct</title>
<updated>2020-04-26T10:47:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-26T10:47:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e9ed3025a8f891effdb03dc82dfd8dfc068b11e9'/>
<id>urn:sha1:e9ed3025a8f891effdb03dc82dfd8dfc068b11e9</id>
<content type='text'>
There is no other types of damage but scroll damage.
</content>
</entry>
<entry>
<title>fcft: adjust to fcft-2.0 API changes</title>
<updated>2020-04-21T17:29:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-21T17:29:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7194f65ae9a49e0725310f8529de8ef61ac4a46b'/>
<id>urn:sha1:7194f65ae9a49e0725310f8529de8ef61ac4a46b</id>
<content type='text'>
* font_*() -&gt; fcft_*()
* struct font -&gt; struct fcft_font
* struct glyph -&gt; struct fcft_glyph
* enum subpixel_order -&gt; enum fcft_subpixel
</content>
</entry>
<entry>
<title>render: use output's subpixel mode when rasterizing glyphs</title>
<updated>2020-04-20T16:38:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-20T16:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6f83ef81e54b2695692c76a0a06c94c53cb7e315'/>
<id>urn:sha1:6f83ef81e54b2695692c76a0a06c94c53cb7e315</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: move 'cursor' state from terminal to grid</title>
<updated>2020-04-16T16:51:14Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-16T16:51:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=89559d5466502176995720a33316714012a638d1'/>
<id>urn:sha1:89559d5466502176995720a33316714012a638d1</id>
<content type='text'>
This way, the 'normal' and 'alt' grids have their own cursor state,
and we don't need to switch between them.
</content>
</entry>
<entry>
<title>Merge branch 'master' into scroll-damage-performance</title>
<updated>2020-03-27T20:16:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-27T20:16:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=598ac4bcd0690995fbf94c7a2b17564dbf69a5f1'/>
<id>urn:sha1:598ac4bcd0690995fbf94c7a2b17564dbf69a5f1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: add --maximized and --fullscreen</title>
<updated>2020-03-27T20:14:49Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-27T20:14:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=758fd9fd58b25ab285868db7f36afdf9378df733'/>
<id>urn:sha1:758fd9fd58b25ab285868db7f36afdf9378df733</id>
<content type='text'>
We now create a copy of the config for each client, and updates it
with the values passed from the client.

Since we're not actually cloning it (and e.g. strdup() all strings
etc) we can't call conf_destroy() to free it, but need to free just
the strings we've replaced.
</content>
</entry>
<entry>
<title>render: pace title updates</title>
<updated>2020-03-25T17:23:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-25T17:23:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9bbbd26c7a2bad131b093cfd559a68fb59613af0'/>
<id>urn:sha1:9bbbd26c7a2bad131b093cfd559a68fb59613af0</id>
<content type='text'>
Synchronize window title updates with window rendering.
</content>
</entry>
<entry>
<title>term: ptmx: don't enqueue extra frame render when app sync updates have been changed</title>
<updated>2020-03-16T16:47:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-16T16:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=233a909160e6e590e6947f9dbfcaa9d0e3c57729'/>
<id>urn:sha1:233a909160e6e590e6947f9dbfcaa9d0e3c57729</id>
<content type='text'>
Track whether app-sync updates were enabled or disabled while handling
the current chunk of PTMX data.

This fixes and issue where we called render_refresh() unnecessarily
under (at least) the following conditions:

* Application sent "BSU &lt;data&gt; ESU" in the *same* chunk. In this case
  we never saw that app sync was enabled and triggered delayed
  rendering as usual.

* Application sent ESU. While we had noticed app sync updates being
  enabled in earlier PTMX reads, when it was disabled *in the current*
  PTMX read, we treated it as if it had not been enabled at all.

  This caused us to trigger delayed rendering.

  Now we call render_refresh() directly from ESU, and detect the "flip
  off" case in PTMX read and avoid triggering a delayed rendering.

The end result of all this is that each key press (for e.g. scrolling
in a pager application) went from two frames being rendered, to a
single frame.
</content>
</entry>
<entry>
<title>alt-screen: use a custom 'saved' cursor when switching to alt screen</title>
<updated>2020-03-16T11:00:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-16T11:00:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1006608093fbbe19103f63fc1140b122a3904500'/>
<id>urn:sha1:1006608093fbbe19103f63fc1140b122a3904500</id>
<content type='text'>
This fixes an issue where we failed to restore the cursor correctly
when exiting from the alternate screen, if the client had sent escapes
to save the cursor position while inside the alternate screen.

This was because we used the *same* storage for saving the cursor
position through escapes, as for saving it when entering the alternate
screen.

Fix by using a custom variable dedicated to normal &lt;--&gt; alt screen
switching.
</content>
</entry>
</feed>
