<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/render.c, branch 1.20.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.20.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.20.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2024-12-08T11:55:57Z</updated>
<entry>
<title>box-drawings: implement octants</title>
<updated>2024-12-08T11:55:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-12-08T08:05:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9a1b59adaec22434473789953884c9b6db58e9a5'/>
<id>urn:sha1:9a1b59adaec22434473789953884c9b6db58e9a5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: remove unnecessary call to wl_surface_damage_buffer()</title>
<updated>2024-10-06T09:26:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-10-06T09:26:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e891abdd6a6652bd46b28c1988700a7f30931210'/>
<id>urn:sha1:e891abdd6a6652bd46b28c1988700a7f30931210</id>
<content type='text'>
The damage region(s) are translated to wl_surface_damage_buffer()
calls after the entire frame has been rendered.
</content>
</entry>
<entry>
<title>render: sixels: update damage region when rendering sixels</title>
<updated>2024-10-05T06:55:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-10-05T06:53:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ce38f5b41395963bd17f9f998802945db4987a2b'/>
<id>urn:sha1:ce38f5b41395963bd17f9f998802945db4987a2b</id>
<content type='text'>
This fixes flickering when foot is forced to double-buffer (e.g when
running under KDE, or smithay based compositors).

Since the damage region isn't updated, the sixel images aren't
included in the memcpy that is done to transfer the last frame's
updated regions to the next frame.

As a result, every other frame will have the sixels, while the others
don't.

Closes #1851
</content>
</entry>
<entry>
<title>render: do dirty/clean consistency check before rendering sixels</title>
<updated>2024-09-21T07:11:28Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-21T07:11:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6ad84dab2de90a425bcea84a6cc7b181a517fafc'/>
<id>urn:sha1:6ad84dab2de90a425bcea84a6cc7b181a517fafc</id>
<content type='text'>
Since the sixels may render some of the cells, we want the check to
happen before the sixels.
</content>
</entry>
<entry>
<title>render: double-buffer: optimization: skip clean rows</title>
<updated>2024-09-21T07:11:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-20T15:14:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=798b44934fe36e7fcd738e4395df70fed9246b35'/>
<id>urn:sha1:798b44934fe36e7fcd738e4395df70fed9246b35</id>
<content type='text'>
When scanning the grid for all-dirty rows (that we can remove from the
damage region we're about to memcpy from the old frame), check the
row-&gt;dirty bit, and skip scanning the cells of that row altogether.

We're only looking for rows where all cells are dirty - those rows can
be removed from the region we copy from the old frame, since the
entire row will be re-rendered anyway.

If a row is clean, it *must* be copied from the old frame.
</content>
</entry>
<entry>
<title>render: (debug): assert row-&gt;dirty vs. cell-&gt;attrs.clean consistency</title>
<updated>2024-09-21T07:11:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-20T15:13:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a9fefcf58b5bb5d1c6a2436c7500be2b45f596d8'/>
<id>urn:sha1:a9fefcf58b5bb5d1c6a2436c7500be2b45f596d8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: xcursor_is_valid(): don't crash when there's no theme loaded</title>
<updated>2024-09-21T07:10:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-21T07:08:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e2aeb7f3361b87e61a8bc5f478bb2dab056b1ac4'/>
<id>urn:sha1:e2aeb7f3361b87e61a8bc5f478bb2dab056b1ac4</id>
<content type='text'>
When trying to set a custom cursor shape, we first validate it. This
is done by checking against known server-side names, and then trying
to load the cursor from the client side cursor theme.

But, if we're using server side names, there is no theme loaded, and
foot crashed.

Fix by checking if we have a theme loaded, and if not, fail the cursor
shape name validation.
</content>
</entry>
<entry>
<title>render: add missing include, limits.h</title>
<updated>2024-09-15T07:56:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-15T07:56:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=297cb370aa3f9e9a9093415217be410fae6fccfa'/>
<id>urn:sha1:297cb370aa3f9e9a9093415217be410fae6fccfa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>toplevel-icon: implement OSC-1, CSI 20/21/22/23 t</title>
<updated>2024-09-13T07:04:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-10T16:53:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=97ec375c67cc7b071b0478b6c887057008dc469e'/>
<id>urn:sha1:97ec375c67cc7b071b0478b6c887057008dc469e</id>
<content type='text'>
* The toplevel icon is now set to the app-id, unless "overridden" by
  OSC-1 or OSC-0.
* Implemented OSC-1
* OSC-0 extended to also set the icon
* Implemented CSI 20 t - report window icon
* Implemented CSI 21 t - report window title
* Implemented CSI 22 ; 1 t - push window icon
* Implemented CS 23 ; 1 t - pop window icon
* Extended CSI 22/23 ; 0 t to also push/pop the icon
* Verify app-id set by OSC-176 is valid UTF-8
* Verify icon set by OSC-0/1 is valid UTF-8
</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>render: resize(): don't overflow the number of scrollback lines</title>
<updated>2024-09-09T04:58:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-09T04:51:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1925593a374b3e3b4cead86abc4ae352260a372e'/>
<id>urn:sha1:1925593a374b3e3b4cead86abc4ae352260a372e</id>
<content type='text'>
The config system allows setting the scrollback lines to
2**32-1.

However, the total number of grid lines is the scrollback lines plus
the window size, and then rounded *up* to the nearest power of two.

Furthermore, the number of rows is represented with a plain 'int'
throughout the code base.

The largest positive integer that fits in an int is 2**31-1. That
however, is not a power of two.

The largest positive integer, that also is a power of two, that fits
in an int is 2**30, or 1073741824.

Ideally, we'd just cast the line count to a 64-bit integer, and call
__builtin_clzl{,l}() on it, and then take the smallest value of that,
or 2**30. But, for some reason, __builtin_clzl(), and
__builtin_clzll() appears to ignore bits above 32, despite they being
typed to long and long long. Bug?

Instead, ensure we never call __builtin_clz() on anything larger than
2**30.

Closes #1828
</content>
</entry>
<entry>
<title>add setting for strikeout thickness</title>
<updated>2024-08-26T17:34:47Z</updated>
<author>
<name>Oleh Hushchenkov</name>
<email>o.hushchenkov@gmail.com</email>
</author>
<published>2024-08-25T08:28:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b47a4dd2553b7f4db5a385b15bc7cb559c9932db'/>
<id>urn:sha1:b47a4dd2553b7f4db5a385b15bc7cb559c9932db</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: follow cursor.unfocused-style regardless of cursor.style</title>
<updated>2024-08-20T04:59:33Z</updated>
<author>
<name>tokyo4j</name>
<email>hrak1529@gmail.com</email>
</author>
<published>2024-08-14T16:18:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a2fc2a986eedc5ac7c83ae21618acedcb7b7aab8'/>
<id>urn:sha1:a2fc2a986eedc5ac7c83ae21618acedcb7b7aab8</id>
<content type='text'>
Before this commit, cursor.unfocused-style was effective only with
cursor.style=block
</content>
</entry>
<entry>
<title>csd: track pointer when rendering and handling CSD button clicks</title>
<updated>2024-08-09T06:20:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-08-09T06:20:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bef613e656a36400577cde295b09267c80f3adce'/>
<id>urn:sha1:bef613e656a36400577cde295b09267c80f3adce</id>
<content type='text'>
* Render button as highlighted only when pointer is above them
* Releasing the mouse button while *not* on the button does *not*
  activate the button

When pressing, and holding, a mouse button, the compositor keeps
sending motion events for the surface where the button was pressed,
even if the mouse has moved outside it.

We also don't get any surface leave/enter events.

This meant that the button was rendered as highlighted, and a click
registered, if the user pressed the mouse button while on the button,
and then moved the cursor away from the button before releasing the
button.

This patch fixes it, by checking if the current cursor coordinates
fall within the button surface.
</content>
</entry>
<entry>
<title>Remove a number of unused includes</title>
<updated>2024-08-02T06:28:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-08-01T18:11:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a9e462d952ca1e0367e9e6eb6ee00a0cda7e8c9b'/>
<id>urn:sha1:a9e462d952ca1e0367e9e6eb6ee00a0cda7e8c9b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: in-band window resize notifications, private mode 2048</title>
<updated>2024-07-19T04:54:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-06-30T17:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=38461eef6f3b612277bf48e49b9cc6c3b79e25bb'/>
<id>urn:sha1:38461eef6f3b612277bf48e49b9cc6c3b79e25bb</id>
<content type='text'>
This implements
https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83,
in-band window resize notifications.

When user enables private mode 2048 (in-band resize
notifications), *always* send current size, even if the mode is
already active.

This ensures applications can rely on getting a reply from the
terminal.
</content>
</entry>
<entry>
<title>render: hollow-cursor: use correct cursor color</title>
<updated>2024-07-13T08:37:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-07-13T08:22:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=56556e5f237025619820a3c8595e0de9d2b1c230'/>
<id>urn:sha1:56556e5f237025619820a3c8595e0de9d2b1c230</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: cursor: use default fg/bg if cell fg/bg are the same</title>
<updated>2024-07-13T08:30:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-07-13T08:19:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c46c124363fad6dabd8328bdf8e15e5da8fabf7e'/>
<id>urn:sha1:c46c124363fad6dabd8328bdf8e15e5da8fabf7e</id>
<content type='text'>
When deciding which colors to use for the cursor, and the cursor text
and background colors are the same, use the default fg/bg instead.

Closes #1761
</content>
</entry>
<entry>
<title>osc: merge OSC 10/11/12/17/19 handling</title>
<updated>2024-07-03T07:47:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-07-01T15:24:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5d4a002413cdf09aa471e29b0a7ae29f7cf7b89c'/>
<id>urn:sha1:5d4a002413cdf09aa471e29b0a7ae29f7cf7b89c</id>
<content type='text'>
10/11/17/19 were already merged, so this patch just stops special
casing 12 (cursor color).

In preparation for XTPUSHCOLORS/XTPOPCOLORS, the cursor colors are
moved from their own struct, into the 'colors' struct.

Also fix a bug where OSC 17/19 queries returned OSC-11 data.
</content>
</entry>
<entry>
<title>render: fix "maybe-uninitialized" error in draw_styled_underline()</title>
<updated>2024-07-03T05:55:01Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2024-07-03T05:55:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=970b95509c0ddb8dcf3733f3f27eb78da792a296'/>
<id>urn:sha1:970b95509c0ddb8dcf3733f3f27eb78da792a296</id>
<content type='text'>
Reproducer:

    CFLAGS='-Og -g' meson setup --buildtype=debug bld
    ninja -C bld

Error message:

    ../render.c: In function ‘draw_styled_underline’:
    ../render.c:490:19: error: ‘y_ofs’ may be used uninitialized
    [-Werror=maybe-uninitialized]
      490 |         const int top = y + y_ofs;
          |                   ^~~
    ../render.c:405:9: note: ‘y_ofs’ was declared here
      405 |     int y_ofs;
          |         ^~~~~
</content>
</entry>
</feed>
