<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/render.c, branch releases/1.7</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=releases%2F1.7</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=releases%2F1.7'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-04-18T18:09:10Z</updated>
<entry>
<title>config: bold-text-in-bright: add ‘palette-based’ as a special value</title>
<updated>2021-04-18T18:09:10Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-17T19:57:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1df48fcb33f2e6009e7e4055662e441f2f0c3314'/>
<id>urn:sha1:1df48fcb33f2e6009e7e4055662e441f2f0c3314</id>
<content type='text'>
When ‘bold-text-in-bright’ is set ‘to palette-based’, colors matching
one of the 8 regular palette colors are brightened by using the
corresponding bright palette color.

Other colors, or all colors if ‘bold-text-in-bright’ is set to
‘yes|true’, are brightened by increasing the luminance.
</content>
</entry>
<entry>
<title>render: brighten: use corresponding bright palette color for base 8 colors</title>
<updated>2021-04-18T18:09:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-17T19:02:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=11e8ff9dc5a4afe3f4cbcd8042c43511288d8713'/>
<id>urn:sha1:11e8ff9dc5a4afe3f4cbcd8042c43511288d8713</id>
<content type='text'>
When brightening one of the 8 base (“regular”) colors, use the
corresponding bright palette color, instead of increasing the
luminance.

Closes #449
</content>
</entry>
<entry>
<title>render: no need to blend fully opaque sixel images - just blit them</title>
<updated>2021-04-18T18:08:46Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-14T09:09:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f62ac3d6831f69b8811e340227452cc540e368b2'/>
<id>urn:sha1:f62ac3d6831f69b8811e340227452cc540e368b2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: don’t let URL jump label sub-surfaces extend outside window geometry</title>
<updated>2021-04-18T18:08:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-10T11:16:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8561fdb0047f307e9c2a7a0b64dbc9e6d8d080a5'/>
<id>urn:sha1:8561fdb0047f307e9c2a7a0b64dbc9e6d8d080a5</id>
<content type='text'>
We have no guarantee that sub-surfaces extending outside the window
geometry are rendered correctly (if at all).

For example, both Sway and River will render the window border on top
of the sub-surface.

Future versions of Sway may clip the sub-surface.

Since jump-labels are positioned slightly above, and to the left of
the URLs first character, having a label on either the top row, or on
the first column, will likely position it outside the window. This is
handled by simply setting x/y to 0 (or, to -margin, since the label
coordinate is later offsetted with the window margins).

Second, if the label is very long, it may extend outside the
window. This is very unusual for labels only showing the key, and not
the URL itself, but could happen in this case too, if e.g. the user
has configured double-width key characters.

This is handled by calculating its maximum width, and then truncating
the label.

Although very unlikely, it is possible for a label to also extend
outside the window’s vertical size. This could happen for very small
font sizes, where the label’s own margins are large, relative to the
font size. This case is currently not handled.

Closes #443
</content>
</entry>
<entry>
<title>config: add box-drawings-uses-font-glyphs=no|yes option</title>
<updated>2021-04-18T18:08:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-09T21:19:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ce321e663e6974fd622a36777c67c7a156d01fa4'/>
<id>urn:sha1:ce321e663e6974fd622a36777c67c7a156d01fa4</id>
<content type='text'>
When disabled, we render box drawing characters ourselves. This is the
default.

When enabled, we instead use font glyphs. I.e. no special treatment.

Closes #430
</content>
</entry>
<entry>
<title>render: draw underline cursor below text underline</title>
<updated>2021-04-18T18:08:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-09T19:47:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2efd1016ce9174cffbfe2c800038a1f141fd712c'/>
<id>urn:sha1:2efd1016ce9174cffbfe2c800038a1f141fd712c</id>
<content type='text'>
This ensures the cursor is visible on cells where the text is
underlined.

Closes #415
</content>
</entry>
<entry>
<title>osc: implement OSC 17+19: change selection background/foreground colors</title>
<updated>2021-04-18T18:08:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-07T06:09:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d620a7b3b43320985ac788851ee464826ff8f713'/>
<id>urn:sha1:d620a7b3b43320985ac788851ee464826ff8f713</id>
<content type='text'>
And of course, we also implement the corresponding reset sequences,
OSC 117+119.
</content>
</entry>
<entry>
<title>config/terminal: refactor: remove “default_*” color members from terminal struct</title>
<updated>2021-04-18T18:07:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-07T06:07:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=292a7c5686d04160b4417ed5d57a9410ebf492cf'/>
<id>urn:sha1:292a7c5686d04160b4417ed5d57a9410ebf492cf</id>
<content type='text'>
Access the original colors in the configuration instead.
</content>
</entry>
<entry>
<title>render: make sure surface buffer sizes are a multiple of the scaling factor</title>
<updated>2021-03-25T08:39:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-24T19:52:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1a0f13640e6f007cd08220dc54fed8b6dd8eec3c'/>
<id>urn:sha1:1a0f13640e6f007cd08220dc54fed8b6dd8eec3c</id>
<content type='text'>
The buffer attached to a surface with wl_surface_attach() must have a
width and height that both are a multiple of the scale configured for
that buffer:

   The new size of the surface is calculated based on the buffer
   size transformed by the inverse buffer_transform and the
   inverse buffer_scale. This means that at commit time the supplied
   buffer size must be an integer multiple of the buffer_scale. If
   that's not the case, an invalid_size error is sent.

Due to a libwayland bug[^1], this is currently *not* being reported as an
error. However, recent versions of Sway have started enforcing this,
and is e.g. dropping (not rendering) sub-surfaces that does not adhere
to this.

[^1]: https://gitlab.freedesktop.org/wayland/wayland/-/issues/194

Closes #409
</content>
</entry>
<entry>
<title>render: render_osd(): no need to pass width/height as parameters</title>
<updated>2021-03-25T08:39:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-24T19:51:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5b8b3baa6537d56de5a4c78dfd505a851da25aa8'/>
<id>urn:sha1:5b8b3baa6537d56de5a4c78dfd505a851da25aa8</id>
<content type='text'>
All uses of render_osd() passes buf-&gt;width/buf-&gt;height as
width/height. Thus, we can simply remove the width/height parameters
and have render_osd() use buf-&gt;width and buf-&gt;height directly.
</content>
</entry>
<entry>
<title>render: draw sixels before taking the render worker lock</title>
<updated>2021-03-25T08:38:51Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-24T19:46:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8111ff4be8335c73b93717ba6b948ee57395a740'/>
<id>urn:sha1:8111ff4be8335c73b93717ba6b948ee57395a740</id>
<content type='text'>
This fixes a possible deadlock; render_sixels_images() may call
render_cell(), which may need to take the worker lock (when rendering
either a blinking cell, or a box drawing glyph that isn’t yet in the
glyph cache).
</content>
</entry>
<entry>
<title>ime: don’t pass ‘term’ to ime_update_cursor_rect()</title>
<updated>2021-03-25T08:36:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-23T12:56:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=13b45db13e134c81ea72d1d70bf782ecd2445900'/>
<id>urn:sha1:13b45db13e134c81ea72d1d70bf782ecd2445900</id>
<content type='text'>
In all instances where we call ime_update_cursor_rect(), the ‘term’
argument is the same as seat-&gt;kbd_focus.

So, let ime_update_cursor_rect() use that directly instead.

Also make ime_send_cursor_rect() static (i.e. local to ime.c).
</content>
</entry>
<entry>
<title>ime: move preedit state from terminal struct to the seat struct</title>
<updated>2021-03-25T08:36:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-23T12:03:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e8ffb05bc7fb3b996752f345b77af4b757f69776'/>
<id>urn:sha1:e8ffb05bc7fb3b996752f345b77af4b757f69776</id>
<content type='text'>
This ensures different seat’s don’t step on each others IME pre-edit
state.

It also removes most dependencies on having a valid term pointer for
many IME operations.

We’re still not all the way, since we support disabling IME with a
private mode, which is per terminal, not seat.

Thus, we still require the seat to have keyboard focus on one of our
windows.

Closes #324. But note that *rendering* of multiple seat’s IME pre-edit
strings is still broken.
</content>
</entry>
<entry>
<title>render: sixels: render cursor, if it’s partially covered by an opaque sixel</title>
<updated>2021-03-11T16:34:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-09T16:32:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=655e756f580e8caffa1d9de7d7310454cff8d1b1'/>
<id>urn:sha1:655e756f580e8caffa1d9de7d7310454cff8d1b1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sixel: implement P2=1 - transparent pixels</title>
<updated>2021-03-11T16:34:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-09T16:23:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7d315d7bf9ab0376468929f0e41fbac98370e035'/>
<id>urn:sha1:7d315d7bf9ab0376468929f0e41fbac98370e035</id>
<content type='text'>
When P2=1, empty pixels are transparent.

This patch also changes the behavior of P2=0|2, from setting empty
pixels to the default background color, to instead use the *current*
background color.

To implement this, a couple of changes are needed:

* Sixel pixels always use alpha=1.0, except for *empty* cells when
  P2=1 (i.e. transparent pixels).
* The renderer draws sixels with the OVER operator, instead of the SRC
  operator.
* The renderer *must* now render the cells beneath the sixel. As an
  optimization, this is only done for sixels where P2=1. I.e. for
  fully opaque sixels, there’s no need to render the cells beneath.

The sixel renderer isn’t yet hooked into the multi-threaded
renderer. This means *rows* (not just the cells) beneath
maybe-transparent sixels are rendered single-threaded.

Closes #391.
</content>
</entry>
<entry>
<title>render: jump-labels: case insensitive comparison when looking for matching keys</title>
<updated>2021-03-04T07:55:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-04T07:55:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=31a3b7dadfd61e7b54321ad374486be1caeb91a8'/>
<id>urn:sha1:31a3b7dadfd61e7b54321ad374486be1caeb91a8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>url-mode: snapshot screen state when entering URL mode</title>
<updated>2021-02-26T08:15:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-22T09:22:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=54b5ae95c1bb01c5103b3ce97a8faebe75e142bb'/>
<id>urn:sha1:54b5ae95c1bb01c5103b3ce97a8faebe75e142bb</id>
<content type='text'>
Previously, we automatically exited URL mode whenever we received data
on the PTY. This was done since we don’t know _what_ has changed on
the screen, and we don’t want to display misleading jump labels.

However, this becomes a problem in curses-like applications that
periodically updates part of the screen. For example, a statusbar with
a clock.

This patch changes this behavior; instead of cancelling URL mode when
receiving PTY data, we snapshot the grid when entering URL mode.

When *rendering*, we use the snapshot:ed grid, while PTY updates
modify the “real” grid.

Snapshot:ing the grid means taking a full/deep copy of the current
grid, including sixel images etc.

Finally, it isn’t necessary to “damage” the entire view
when *entering* URL mode, since we’re at that point the renderer is in
sync with the grid. But we *do* need to damage the entire view when
exiting URL mode, since the grid changes on the “real” grid hasn’t
been tracked by the renderer.
</content>
</entry>
<entry>
<title>urls: add key binding that toggles whether URLs are displayed on jump-label</title>
<updated>2021-02-21T19:15:31Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-14T13:18:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=06a9ffa7632abf201b0ea0270bb5058af4fc4a6b'/>
<id>urn:sha1:06a9ffa7632abf201b0ea0270bb5058af4fc4a6b</id>
<content type='text'>
By default, the URL isn’t shown on the jump-label. For auto-detect
URLs, doing so is virtually always useless, as the URL is already
visible in the grid.

For OSC-8 URLs however, the URL is often _not_ visible in the
grid. Many times, seeing the URL is still not needed (if you’re doing
‘ls --hyperlink’, you already know what the URIs are).

But it is still useful to have a way to show the URLs.

This patch adds a new key binding action that can be used in url-mode
to toggle the URL on and off in the jump label.

It is bound to ctrl+t by default.
</content>
</entry>
<entry>
<title>urls: remove free-form ‘text’ member from URL struct</title>
<updated>2021-02-21T19:15:31Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-14T12:42:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cc43c1b7048d2cf1cedb48ca63ecde40e2d0dbf5'/>
<id>urn:sha1:cc43c1b7048d2cf1cedb48ca63ecde40e2d0dbf5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>url-mode: multiple URL (parts) with the same ID is assigned a single key sequence</title>
<updated>2021-02-21T19:15:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-13T12:45:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fb9e9513a59126831862a59ce9db2d2896299441'/>
<id>urn:sha1:fb9e9513a59126831862a59ce9db2d2896299441</id>
<content type='text'>
In case an URL is split up into multiple parts, those parts are now
treated as a single URL when it comes to key assignment.

Only the *first* URL part is actually assigned a key combo. The other
parts are ignored.

We still highlight them, but for all other purposes they are ignored.
</content>
</entry>
</feed>
