<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/wayland.c, branch 1.10.2</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.10.2</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.10.2'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-11-09T17:23:44Z</updated>
<entry>
<title>wayland: guard XDG startup notification with HAVE_XDG_ACTIVATION</title>
<updated>2021-11-09T17:23:44Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-09T17:23:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3e04c4e4f48195134aaf5671b528435fd8801e3c'/>
<id>urn:sha1:3e04c4e4f48195134aaf5671b528435fd8801e3c</id>
<content type='text'>
Fixes compilation on systems with “too old” wayland-protocols
</content>
</entry>
<entry>
<title>wayland: error out if there aren’t any seats available</title>
<updated>2021-11-07T10:29:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-07T10:29:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0183e13f505c0afa7cea9eb5a0873d9596916fcb'/>
<id>urn:sha1:0183e13f505c0afa7cea9eb5a0873d9596916fcb</id>
<content type='text'>
If there aren’t any seats available, input is not possible (neither
keyboard nor mouse input).

Note that this is not the same thing as e.g. no keyboard being plugged
in. In this case, there will be a seat, but without the keybaord
capability. Input may not be possible _right now_, but may be later,
if the user plugs in a keyboard.

Closes #779
</content>
</entry>
<entry>
<title>foot/client: implement xdga client activation</title>
<updated>2021-11-01T01:52:29Z</updated>
<author>
<name>Ronan Pigott</name>
<email>rpigott@berkeley.edu</email>
</author>
<published>2021-10-29T00:51:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=99d5bf64bca5daa70e3e8c5a4d63a257ba7e6fb8'/>
<id>urn:sha1:99d5bf64bca5daa70e3e8c5a4d63a257ba7e6fb8</id>
<content type='text'>
This is an application of the xdg activation protocol that will allow
compositors to associate new foot toplevels with the command that
launched them.

footclient receives an activation token from the launcher which the
compositor can use to track application startup. It passes the token
to the foot server, which then activates the new window with the token
to complete the startup sequence.
</content>
</entry>
<entry>
<title>term: only scale using DPI if *all* monitors have a scaling factor or one</title>
<updated>2021-09-24T20:07:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-09-19T09:58:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fb77637eb96a71de48b49e40fbe7dd71ec85bcbf'/>
<id>urn:sha1:fb77637eb96a71de48b49e40fbe7dd71ec85bcbf</id>
<content type='text'>
With dpi-aware=auto (the default), scale fonts using DPI *only*
if *all* available monitors have a scaling factor of one.

The idea is this: if a user, with multiple monitors, have enabled
scaling on *at least* one monitor, he/she has most likely done so to
match the size of his/hers other monitors.

For example, if the user has one monitor with a scaling factor of one,
and another one with a scaling factor of two, he/she expects things to
be twice as large on the second monitor.

If we (foot) scale using DPI on the first monitor, and using the
scaling factor on the second monitor, foot will *not* look twice as
big on the second monitor (this was the old behavior of
dpi-aware=auto).

Part of #714
</content>
</entry>
<entry>
<title>wayland: set scale to 1 by default</title>
<updated>2021-07-26T09:18:37Z</updated>
<author>
<name>Nihal Jere</name>
<email>nihal@nihaljere.xyz</email>
</author>
<published>2021-07-26T02:46:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=52f50c556d485c99ff1d8e4f12d9f0499e283148'/>
<id>urn:sha1:52f50c556d485c99ff1d8e4f12d9f0499e283148</id>
<content type='text'>
The wl_output protocol specifies that the client should assume
that scale is 1 if not set by the compositor.
</content>
</entry>
<entry>
<title>wayland: prevent hang when terminating due to broken Wayland connection</title>
<updated>2021-07-24T18:38:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-24T18:31:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bcd28311f4e2625ae45a21bbcd1817cdcf5ce5f3'/>
<id>urn:sha1:bcd28311f4e2625ae45a21bbcd1817cdcf5ce5f3</id>
<content type='text'>
If the call to fdm_wayl() with EPOLLHUP was followed by calls to
wayl_roundtrip(), foot would hang.

The reason for this is that the EPOLLHUP handler in fdm_wayl() would
call wl_display_cancel_read().

wayl_roundtrip() also calls wl_display_cancel_read() (since we
normally have called wl_display_prepare_read()), before calling
wl_display_roundtrip().

When calling wl_display_cancel_read() two times in a row, without a
wl_display_prepare_read() in between, wl_display_roundtrip() hangs.

Fix by not calling wl_display_cancel_read() in fdm_wayl(). This
ensures our invariant holds: wl_display_prepare_read() is *always* in
effect outside of fdm_wayl().

Closes #651
</content>
</entry>
<entry>
<title>config: add csd.font option</title>
<updated>2021-07-24T09:02:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-22T21:21:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=50f59fe575f339b36c1abdeb74f85be776fcdc47'/>
<id>urn:sha1:50f59fe575f339b36c1abdeb74f85be776fcdc47</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: csd_title(): use a custom font, sized based on the title bar’s height</title>
<updated>2021-07-24T09:02:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-22T19:23:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0cf7a196163d51c344361bb2b79c145003dc3555'/>
<id>urn:sha1:0cf7a196163d51c344361bb2b79c145003dc3555</id>
<content type='text'>
We still use the primary font, but use a custom size, based on the
title bar’s height.

This fixes an issue where the window title could be way too small, or
way too big. And changed size when the terminal font size was changed.
</content>
</entry>
<entry>
<title>render: use a single backing SHM pool for CSD surface buffers</title>
<updated>2021-07-18T14:46:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-18T14:46:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=20fc80e57e365f2e002eead7de110cb23ffa7adc'/>
<id>urn:sha1:20fc80e57e365f2e002eead7de110cb23ffa7adc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>shm: refactor: move away from a single, global, buffer list</title>
<updated>2021-07-17T17:14:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-16T14:48:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=53851e13ec976001cdec2077d7963c292bcd6d20'/>
<id>urn:sha1:53851e13ec976001cdec2077d7963c292bcd6d20</id>
<content type='text'>
Up until now, *all* buffers have been tracked in a single, global
buffer list. We've used 'cookies' to separate buffers from different
contexts (so that shm_get_buffer() doesn't try to re-use e.g. a
search-box buffer for the main grid).

This patch refactors this, and completely removes the global
list.

Instead of cookies, we now use 'chains'. A chain tracks both the
properties to apply to newly created buffers (scrollable, number of
pixman instances to instantiate etc), as well as the instantiated
buffers themselves.

This means there's strictly speaking not much use for shm_fini()
anymore, since its up to the chain owner to call shm_chain_free(),
which will also purge all buffers.

However, since purging a buffer may be deferred, if the buffer is
owned by the compositor at the time of the call to shm_purge() or
shm_chain_free(), we still keep a global 'deferred' list, on to which
deferred buffers are pushed. shm_fini() iterates this list and
destroys the buffers _even_ if they are still owned by the
compositor. This only happens at program termination, and not when
destroying a terminal instance. I.e. closing a window in a “foot
--server” does *not* trigger this.

Each terminal instatiates a number of chains, and these chains are
destroyed when the terminal instance is destroyed. Note that some
buffers may be put on the deferred list, as mentioned above.
</content>
</entry>
<entry>
<title>wayland: win_destroy: unmap URL labels</title>
<updated>2021-07-15T16:45:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-15T16:45:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5d7b729ac51ac80984da6d40f91a3a12bff0888a'/>
<id>urn:sha1:5d7b729ac51ac80984da6d40f91a3a12bff0888a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: explicitly purge all SHM pixmaps when destroying window</title>
<updated>2021-07-11T08:01:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-11T08:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a9872aac5af98ac5a643304b062aa984c4642f97'/>
<id>urn:sha1:a9872aac5af98ac5a643304b062aa984c4642f97</id>
<content type='text'>
All SHM pixmap cookies depend on the terminal instance’s memory
address. Thus, after a terminal instance has been destroyed, shm
pixmaps that belonged to it will never be purged automatically.
</content>
</entry>
<entry>
<title>wayland: purge CSD pixmaps when destroying the CSDs</title>
<updated>2021-07-11T07:59:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-11T07:59:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b5950d9b27f28d4b62f533b4df728e1170aacd62'/>
<id>urn:sha1:b5950d9b27f28d4b62f533b4df728e1170aacd62</id>
<content type='text'>
CSDs aren’t typically toggled on and off. Thus, when disabled,
immediately purge their corresponding pixmap buffers, to free up some
memory, and release file descriptors.
</content>
</entry>
<entry>
<title>url-mode: purge SHM pixmaps when destroying URLs</title>
<updated>2021-07-11T07:59:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-11T07:54:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0a6e7e6167e04e1ee38cfaba4d38c2776cf474b4'/>
<id>urn:sha1:0a6e7e6167e04e1ee38cfaba4d38c2776cf474b4</id>
<content type='text'>
Unlike other surface types, the SHM cookie depends on the address of
each URL instance. This means if we enable, disable, and then enable
URL mode again (thus showing exactly the same URLs as the first time),
the URLs will have new addresses, and thus the old SHM pixmaps will
not get purged automatically.

So, manually purge them when destroying the URLs.
</content>
</entry>
<entry>
<title>wayland: regression: properly instantiate CSDs when there’s no decoration manager</title>
<updated>2021-06-24T21:02:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-24T21:02:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=20c0650dfdfb64c17499e04665f491a6871d4917'/>
<id>urn:sha1:20c0650dfdfb64c17499e04665f491a6871d4917</id>
<content type='text'>
* Set win-&gt;configure.csd_mode, not win-&gt;csd_mode. Otherwise our
  ‘configure’ handler will swap out the CSD_YES we set, for
  CSD_UNKNOWN(?), resulting in no CSDs at all.

* Don’t instantiate the CSDs in wayl_win_init(), let the ‘configure’
  event handler do that. Just like it does when we have a decoration
  manager emitting decoration configure events.
</content>
</entry>
<entry>
<title>wayland: apply CSD/SSD changes in the surface configure event</title>
<updated>2021-06-23T10:37:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-22T16:58:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2a83202fddc4423fd102b0d5f19b0b445301a88e'/>
<id>urn:sha1:2a83202fddc4423fd102b0d5f19b0b445301a88e</id>
<content type='text'>
    The configure event asks the client to change its decoration
    mode. The configured state should not be applied immediately.
    Clients must send an ack_configure in response to this event.
    See xdg_surface.configure and xdg_surface.ack_configure for
    details.

In particular, ”the configured state should *not* be applied
immediately”.

Instead, treat CSD/SSD changes like all other window dimension related
changes: store the to-be mode in win-&gt;configure, and apply it in the
surface configure event.

This fixes an issue where foot incorrectly resized the window when the
server switched between CSD/SSD at run-time.
</content>
</entry>
<entry>
<title>wayland: fdm callback: check return value of wl_display_dispatch_pending()</title>
<updated>2021-05-25T15:50:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-24T18:51:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c3c2ff739853432a15f75f53744c4998a0c27455'/>
<id>urn:sha1:c3c2ff739853432a15f75f53744c4998a0c27455</id>
<content type='text'>
Since it’s inside a while-loop, we’d better handle failures, or we
risk getting stuck.
</content>
</entry>
<entry>
<title>wayland: roundtrip: log error and abort when wl_display_roundtrip() fails</title>
<updated>2021-05-25T15:50:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-24T18:42:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7bdecaae3bc3f493ab7cbec637f7c373b6d96357'/>
<id>urn:sha1:7bdecaae3bc3f493ab7cbec637f7c373b6d96357</id>
<content type='text'>
ayl_roundtrip() has the following code:

    wl_display_roundtrip(wayl-&gt;display);

    while (wl_display_prepare_read(wayl-&gt;display) != 0)
        wl_display_dispatch_pending(wayl-&gt;display);
    wayl_flush(wayl);

If the first wl_display_roundtrip() fails, for example because the
Wayland socket has been closed, we may get stuck in the while-loop.

This happens if the read queue isn’t empty, in which case
wl_display_prepare_read() will return -1 and we’ll continue trying to
dispatch the pending events forever, never succeeding since the socket
is gone.

Closes #542
</content>
</entry>
<entry>
<title>term: get rid of term-&gt;font_scale, use term-&gt;scale only</title>
<updated>2021-05-17T15:55:49Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-13T09:10:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2afc6782361d0deaa443234466775b1121feec8f'/>
<id>urn:sha1:2afc6782361d0deaa443234466775b1121feec8f</id>
<content type='text'>
We only needed term-&gt;font_scale to be able to detect scaling factor
changes (term-&gt;font_scale != term-&gt;scale).

But, we already have the old scaling factor in all places where
term_font_dpi_changed() is called, so let’s pass the old scaling
factor as an argument instead.
</content>
</entry>
<entry>
<title>wayland: workaround epoll-shim defining the macro close</title>
<updated>2021-05-14T11:26:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-11T20:02:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=584d2cacf18e885c8b88e5e8472f62ded00881e5'/>
<id>urn:sha1:584d2cacf18e885c8b88e5e8472f62ded00881e5</id>
<content type='text'>
</content>
</entry>
</feed>
