<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/render.c, branch 1.4.2</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.4.2</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.4.2'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2020-07-22T19:07:57Z</updated>
<entry>
<title>render: bump maximum window title length from 100 to 2048 (bytes)</title>
<updated>2020-07-22T19:07:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-22T19:07:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3869c7299fae34464317ebb71566859608e2c1cf'/>
<id>urn:sha1:3869c7299fae34464317ebb71566859608e2c1cf</id>
<content type='text'>
Apparently, the max is ~8K, but lets stay on the safe side.
</content>
</entry>
<entry>
<title>term: don't re-render last cursor cell if cursor was hidden</title>
<updated>2020-07-15T06:21:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-15T06:21:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=970a42a6dd10b6b6227d67e3bc9d7a66ba84f34b'/>
<id>urn:sha1:970a42a6dd10b6b6227d67e3bc9d7a66ba84f34b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: print: write special value CELL_MULT_COL_SPACER to extra cells</title>
<updated>2020-07-14T14:49:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T14:49:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=df2927e088ceb2119264d1a970c22a450f00005b'/>
<id>urn:sha1:df2927e088ceb2119264d1a970c22a450f00005b</id>
<content type='text'>
When printing a multi-column character, write CELL_MULT_COL_SPACER
instead of '0' to both padding cells (when character doesn't fit at
the end of the line), and to the cells following the actual character.
</content>
</entry>
<entry>
<title>term: rename COMB_CHARS_LO,HI -&gt; CELL_COMB_CHARS_LO,HI</title>
<updated>2020-07-14T14:41:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T14:41:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5c99e8013b3e8fb68e55250be550e856636ccf7b'/>
<id>urn:sha1:5c99e8013b3e8fb68e55250be550e856636ccf7b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: render_margin: don't damage margins when rendering scroll damage</title>
<updated>2020-07-13T12:19:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-13T12:19:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3f55cf3d14f0009d2036fec480e1cb7649c34f14'/>
<id>urn:sha1:3f55cf3d14f0009d2036fec480e1cb7649c34f14</id>
<content type='text'>
When applying scroll damage, we may have to re-render the
margins.

This is because when we SHM-scroll, we actually move the entire
surface, and thus we end up overwriting the top margin area with old
window content, and scroll in uninitialized memory in the bottom
margin.

But, we don't have to tell the compositor about this - the last frame
always contains correct margins; i.e. there's no change between the
last frame and current frame being rendered.

TODO: we _could_ micro-optimize and only damage the margins after a
surface resize. We do it slightly more often now, when dealing with
state changes in screen flash or scrollback searching. But I don't
think it's worth the effort.
</content>
</entry>
<entry>
<title>render: doh! flush the last surface damage *outside* of the rendering loop</title>
<updated>2020-07-13T12:18:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-13T12:18:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=96f480b14d60e40e5e244aa61306754ad5aa7a95'/>
<id>urn:sha1:96f480b14d60e40e5e244aa61306754ad5aa7a95</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: render_margin: add 'damage_{top,bottom,left,right}' arguments</title>
<updated>2020-07-13T12:06:02Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-13T12:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ed620f1854cd740b493f87c5487378139fab3c27'/>
<id>urn:sha1:ed620f1854cd740b493f87c5487378139fab3c27</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: render_margin(): remove top/bottom arguments</title>
<updated>2020-07-13T12:03:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-13T12:03:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0336f47f0561e2ba5793b988c1737393caff21ff'/>
<id>urn:sha1:0336f47f0561e2ba5793b988c1737393caff21ff</id>
<content type='text'>
All calls to render_margin() set top=true and bottom=true anyway.
</content>
</entry>
<entry>
<title>render: merge wl surface damage for consecutive dirty rows</title>
<updated>2020-07-13T11:44:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-13T11:44:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9f21799cb2acbd9d1377c3b16616f689b52913b7'/>
<id>urn:sha1:9f21799cb2acbd9d1377c3b16616f689b52913b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: keep lock while pushing dirty rows to worker queue</title>
<updated>2020-07-13T11:27:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-13T11:27:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=09bdf20aa0a6e29265e5e7b81b941a2b894be3db'/>
<id>urn:sha1:09bdf20aa0a6e29265e5e7b81b941a2b894be3db</id>
<content type='text'>
Instead of locking the queue for each dirty row we append, and
signaling a condition variable, just keep the lock while going through
the visible rows.

Release the lock once done.

Since we take the lock *before* posting the 'start' semaphore, all
workers will be waiting for the lock to be released.

Then, one at a time they'll get the lock and pick a row to
render. The queue will never get empty - when all rows have been
rendered, each worker will pick a 'frame done' "job" from the queue,
and break the rendering loop.
</content>
</entry>
<entry>
<title>render: don't render cursor when it has been explicitly hidden</title>
<updated>2020-07-12T11:08:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-12T11:08:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fe6c228b1302358c4f116f59c27502c120164fd3'/>
<id>urn:sha1:fe6c228b1302358c4f116f59c27502c120164fd3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: remove most of the special handling of cursor rendering</title>
<updated>2020-07-12T10:56:10Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-12T10:56:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2bdd0a7c80837d7289f73c1247898c8423a2368c'/>
<id>urn:sha1:2bdd0a7c80837d7289f73c1247898c8423a2368c</id>
<content type='text'>
Previously, we had to explicitly render the old cursor cell *before*
applying scrolling damage.

We then rendered all the dirty rows, *without* rendering the cursor -
even if the cursor cell was among the dirty rows.

Finally, when everything else was done, we explicitly rendered the
cursor cell.

This meant a lot of code, and unnecessary render_cell() calls, along
with unnecessary wl_surface_damage_buffer() calls.

This was a necessary in the early design of foot, but not anymore.

We can simply mark both the old cursor cell, and the current one, as
dirty and let the normal rendering framework render it. All we need to
do is pass the cursor column to render_row(), so that it can pass
has_cursor=true in the appropriate call to render_cell(). We pass -1
here for all rows, except the cursor's row, where we pass the actual
cursor column.

With this, there's no need to calculate whether the cursor is visible
or not; just mark it's cell as dirty, and if that row is visible, the
normal rendering will take care of it.

This also simplifies the state needed to be saved between two frames;
we only need a row pointer, and the cursor column index.

Part of https://codeberg.org/dnkl/foot/issues/35
</content>
</entry>
<entry>
<title>render: use kbd-focus instead of visual focus for hollow block cursor</title>
<updated>2020-07-11T07:06:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-11T07:06:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=12a1688ce3c1b1e105917d95f5ba7c70c618dfcd'/>
<id>urn:sha1:12a1688ce3c1b1e105917d95f5ba7c70c618dfcd</id>
<content type='text'>
When determining whether we should render a hollow block cursor,
i.e. to signal that we're unfocused, base the decision on the
terminals current keyboard focus, not visual focus.
</content>
</entry>
<entry>
<title>wayland: read XCURSOR_{THEME,SIZE} in reload_xcursor theme</title>
<updated>2020-07-10T10:06:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-10T10:06:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bf62519d8330204b12e9e3743fb332e3abde0ed0'/>
<id>urn:sha1:bf62519d8330204b12e9e3743fb332e3abde0ed0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>multi-seat: improve handling of multiple (mouse) pointers</title>
<updated>2020-07-09T07:52:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-09T07:52:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4e48d550efba98ebecf4b60045004e52c585c52d'/>
<id>urn:sha1:4e48d550efba98ebecf4b60045004e52c585c52d</id>
<content type='text'>
* xcursor always set for all pointers
* xcursor sometimes not updated when it should be
* mouse grabbed state wasn't per seat, but global (i.e. "does at least
  one seat enable mouse grabbing")
* selection enabled state wasn't per seat
</content>
</entry>
<entry>
<title>multi-seat: enable xcursor theme support again</title>
<updated>2020-07-08T16:08:39Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-08T16:08:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=be2490022d445bef2c5c00336aecf2bd9dd25ee7'/>
<id>urn:sha1:be2490022d445bef2c5c00336aecf2bd9dd25ee7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wip: multi-seat support</title>
<updated>2020-07-08T14:45:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-08T14:45:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c47082506714f458e999f6ff1bf3099dfc4c0c0c'/>
<id>urn:sha1:c47082506714f458e999f6ff1bf3099dfc4c0c0c</id>
<content type='text'>
Compiles and runs, but mouse, clipboard and other things have been
disabled.
</content>
</entry>
<entry>
<title>render: sixel: regression: need to take current offset into account when early-quitting sixel rendering</title>
<updated>2020-06-28T12:19:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-06-28T12:19:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c7b2dcc0f4ba6ec451bbfe2b51ac1096aa1505d8'/>
<id>urn:sha1:c7b2dcc0f4ba6ec451bbfe2b51ac1096aa1505d8</id>
<content type='text'>
The sixel images are sorted, that's true. But in order for our row
numer comparisons to actually work, we need to rebase all numbers
against the current scrollback offset (or, the scrollback *end*, to be
precise).
</content>
</entry>
<entry>
<title>render: sixels: break out of loop when we're sure there aren't any more visible images</title>
<updated>2020-06-28T08:45:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-06-28T08:45:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5158be86d2a1be657260c3283548e9fde17ddd7f'/>
<id>urn:sha1:5158be86d2a1be657260c3283548e9fde17ddd7f</id>
<content type='text'>
The sixel list is sorted, with the most recent images *first* in the
list (and thus the "oldest" images are at the back).

This means we can break out of the loop when we see a sixel
that *ends before* the current view starts.

As a minor optimization, we also recognize sixels that *start after*
the current view ends. We can't break out of the loop, but we can skip
trying to render them (they wouldn't have been rendered, but more work
would have been done in render_sixel() to reach this conclusion).
</content>
</entry>
<entry>
<title>render: sixel: use pixman_image_composite32()</title>
<updated>2020-06-06T12:22:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-06-06T12:22:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0969b2ebd7560f50b3f1395871a761fa2e021c15'/>
<id>urn:sha1:0969b2ebd7560f50b3f1395871a761fa2e021c15</id>
<content type='text'>
</content>
</entry>
</feed>
