<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/wayland.h, branch 1.2.2</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.2.2</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.2.2'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2020-03-14T21:34:03Z</updated>
<entry>
<title>term: use logical DPI+scale factor when scaling fonts</title>
<updated>2020-03-14T21:34:03Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-11T15:10:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=36ef0463b7157199aac1876ad4cc9725403fff4a'/>
<id>urn:sha1:36ef0463b7157199aac1876ad4cc9725403fff4a</id>
<content type='text'>
This fixes an issue where the fonts were rendered too small when the
output had fractional scaling.

For integral scaling, using the logical (scaled) DPI multiplied with
the scaling factor results in the same final DPI value as if we had
used the physical DPI.

But for fractional scaling, this works around the fact that the
compositor downscales the surface after we've rendered it.

Closes #5
</content>
</entry>
<entry>
<title>csd: initial implementation of minimize/maximize/close buttons</title>
<updated>2020-03-02T19:29:28Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-02T19:29:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9699c9b8bfcbd7f9ebef5ee4ffe370cb03b1c8a2'/>
<id>urn:sha1:9699c9b8bfcbd7f9ebef5ee4ffe370cb03b1c8a2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: make CSD user configurable</title>
<updated>2020-03-02T17:42:49Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-02T17:42:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=22ce09eb44db887d32a5b3a88740939b7285c763'/>
<id>urn:sha1:22ce09eb44db887d32a5b3a88740939b7285c763</id>
<content type='text'>
The user can now configure the following:

* Whether to prefer CSDs or SSDs. But note that this is only a hint to
  the compositor - it may deny our request. Furthermore, not all
  compositors implement the decoration manager protocol, meaning CSDs
  will be used regardless of the user configuration (GNOME/mutter
  being the most prominent one).
* Title bar size and color, including transparency
* Border size and color, including transparency

Also drop support for rendering the CSDs inside the main surface.
</content>
</entry>
<entry>
<title>render: csd: split up positioning from rendering</title>
<updated>2020-02-29T17:02:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-29T17:02:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=92d638eb1c34859a08605ffc79be8f0a4a3c63a3'/>
<id>urn:sha1:92d638eb1c34859a08605ffc79be8f0a4a3c63a3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: cleanup</title>
<updated>2020-02-29T14:29:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-29T14:29:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=73133c10eed3ad8415646d42a3f6386d7d702348'/>
<id>urn:sha1:73133c10eed3ad8415646d42a3f6386d7d702348</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: csd: add a small delay before initiating a move</title>
<updated>2020-02-29T11:56:04Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-29T11:52:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=43b07b122a1fa460bdda3edc529726e3b6a6463d'/>
<id>urn:sha1:43b07b122a1fa460bdda3edc529726e3b6a6463d</id>
<content type='text'>
This ensures the user has time to double-click to toggle the maximized
state.
</content>
</entry>
<entry>
<title>wayland: remove all usages of wayl_terminal_from_surface()</title>
<updated>2020-02-29T11:13:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-29T11:13:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c917a74f487941fa16548261680484cb78e63189'/>
<id>urn:sha1:c917a74f487941fa16548261680484cb78e63189</id>
<content type='text'>
Use the 'user data' pointer from the wayland surface instead.
</content>
</entry>
<entry>
<title>input: handle CSD border corners correctly</title>
<updated>2020-02-29T08:32:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-29T08:32:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d48a7894120a0040ff240c8dc6df3fc6108363c5'/>
<id>urn:sha1:d48a7894120a0040ff240c8dc6df3fc6108363c5</id>
<content type='text'>
That is, change to correct cursor, and do resize correctly.
</content>
</entry>
<entry>
<title>wayland: once again switch to positioning CSDs outside the main surface</title>
<updated>2020-02-26T19:45:44Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-26T19:45:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=77b37fb2888fe41f9cb31152a11f7e646e285e70'/>
<id>urn:sha1:77b37fb2888fe41f9cb31152a11f7e646e285e70</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: document what FOOT_CSD_OUTSIDE does</title>
<updated>2020-02-26T12:49:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-26T12:49:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=66decac16b3cbcde70558aa565814b78ce3c9410'/>
<id>urn:sha1:66decac16b3cbcde70558aa565814b78ce3c9410</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: switch back to positioning CSDs inside the main surface</title>
<updated>2020-02-26T12:47:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-26T12:47:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1ccfceca05dc5ef12871eb952094e5f9de372be1'/>
<id>urn:sha1:1ccfceca05dc5ef12871eb952094e5f9de372be1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: track window maximized state</title>
<updated>2020-02-26T12:23:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-26T12:23:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5fbbd2f80edb13889267a7af6e75d2d47b92536d'/>
<id>urn:sha1:5fbbd2f80edb13889267a7af6e75d2d47b92536d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csd: don't draw CSDs in fullscreen mode</title>
<updated>2020-02-26T11:39:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-26T11:39:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1e1b2043777511aedcaccf784ebac12bdecd866e'/>
<id>urn:sha1:1e1b2043777511aedcaccf784ebac12bdecd866e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csd: position CSD sub-surfaces *outside* the main window</title>
<updated>2020-02-26T11:17:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-26T11:17:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2f587f6f3d29c2dbfc6625e94144bf325263d090'/>
<id>urn:sha1:2f587f6f3d29c2dbfc6625e94144bf325263d090</id>
<content type='text'>
For now, this behavior is controlled with an ifdef. At least kwin
seems very buggy when the decorations are positioned like this (but
normally you'd use server-side decorations with kwin anyway).

This commit also changes 'use_csd' to be a tri-state variable;
when instantiating a window it is set to 'unknown'.

If there's no decoration manager available (e.g. weston), we
immediately set it to 'yes' (use CSDs).

Otherwise, we wait for the decoration manager callback to indicate
whether we should use CSDs or not.
</content>
</entry>
<entry>
<title>render: make CSD border and title size globally accessible</title>
<updated>2020-02-25T18:08:14Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-25T18:08:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d15eb936ef2ee533cde2596b4c9b9f09cdb03973'/>
<id>urn:sha1:d15eb936ef2ee533cde2596b4c9b9f09cdb03973</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csd: wip: something to get started...</title>
<updated>2020-02-23T13:17:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-23T13:17:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8368e8184ff94a9107d16a62fc3726c584e454d9'/>
<id>urn:sha1:8368e8184ff94a9107d16a62fc3726c584e454d9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: throttle xcursor updates</title>
<updated>2020-01-04T21:58:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-01-04T21:01:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5ec447697c7548fc7930031077e821fd1e26b2f9'/>
<id>urn:sha1:5ec447697c7548fc7930031077e821fd1e26b2f9</id>
<content type='text'>
With a bad behaving client (e.g. 'less' with mouse support enabled),
we can end up with a *lot* of xcursor updates (so much, that we
flooded the wayland socket before we implemented a blocking
wayl_flush()).

Since there's little point in updating the cursor more than once per
frame interval, use frame callbacks to throttle the updates.

This works more or lesslike normal terminal refreshes:

render_xcursor_set() stores the last terminal (window) that had (and
updated) the cursor.

The renderer's FDM hook checks if we have such a pending terminal set,
and if so, tries to refresh the cursor.

This is done by first checking if we're already waiting for a callback
from a previous cursor update, and if so we do nothing; the callback
will update the cursor for the next frame. If we're *not* already
waiting for a callback, we update the cursor immediately.
</content>
</entry>
<entry>
<title>wayland: wl_display_flush() never blocks</title>
<updated>2020-01-04T20:10:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-01-04T20:10:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=abc36d8f090dbae1b127f74a83b601d3fa3c8bed'/>
<id>urn:sha1:abc36d8f090dbae1b127f74a83b601d3fa3c8bed</id>
<content type='text'>
Since it doesn't block, we need to detect EAGAIN failures and ensure
we actually flush everything.

If we don't, we sooner or later end up in a wayland client library
call that aborts due to the socket buffer being full.

Ideally, we'd simply enable POLLOUT in the FDM. However, we cannot
write *anything* to the wayland socket until we've actually managed to
send everything. This means enabling POLLOUT in the FDM wont work
since we may (*will*) end up trying to write more data to it before
we've flushed it.

So, add a wrapper function, wayl_flush(), that acts as a blocking
variant of wl_display_flush(), by detecting EAGAIN failiures and
calling poll() itself, on the wayland socket only, until all data has
been sent.
</content>
</entry>
<entry>
<title>wayland: don't use wl_display_dispatch()</title>
<updated>2020-01-03T20:02:12Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-01-03T20:02:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0ea0323d0fb3130e5bc1782812e70993e5cdb742'/>
<id>urn:sha1:0ea0323d0fb3130e5bc1782812e70993e5cdb742</id>
<content type='text'>
wl_display_dispatch() calls poll(), which is unnecessary since we
already know the FD is readable.

Use the more lower level wl_display_read_events() +
wl_display_dispatch_pending().

These require wl_display_prepare_read() to have been called.

The idea is to call wl_display_prepare_read() **before** calling
poll().

Thus, we do this more or less last in wayl_init(), and at the **end**
of the FDM handler.

However, having taking this lock also means we no longer can call
wl_display_roundtrip() directly (it will hang).

So, add a wrapper, wayl_roundtrip(), that cancels the read intent,
does the roundtrip, and then re-acquires the read intent.
</content>
</entry>
<entry>
<title>render: refresh: ensure window has been configured</title>
<updated>2020-01-03T17:55:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-01-03T17:55:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f7362d381b436718cc26565a09a3a38bf556586d'/>
<id>urn:sha1:f7362d381b436718cc26565a09a3a38bf556586d</id>
<content type='text'>
</content>
</entry>
</feed>
