<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wlroots.git/xwayland/selection, branch master</title>
<subtitle>fork of wlroots with action binder support
</subtitle>
<id>https://git.vlhl.dev/navi/wayland/wlroots.git/atom?h=master</id>
<link rel='self' href='https://git.vlhl.dev/navi/wayland/wlroots.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/wayland/wlroots.git/'/>
<updated>2024-02-15T14:41:12+00:00</updated>
<entry>
<title>Define _POSIX_C_SOURCE globally</title>
<updated>2024-02-15T14:41:12+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2024-02-15T14:34:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/wayland/wlroots.git/commit/?id=842093bb843ae6c719c2b1cf32eb749cab9e46ca'/>
<id>urn:sha1:842093bb843ae6c719c2b1cf32eb749cab9e46ca</id>
<content type='text'>
Stop trying to maintain a per-file _POSIX_C_SOURCE. Instead,
require POSIX.1-2008 globally. A lot of core source files depend
on that already.

Some care must be taken on a few select files where we need a bit
more than POSIX. Some files need XSI extensions (_XOPEN_SOURCE) and
some files need BSD extensions (_DEFAULT_SOURCE). In both cases,
these feature test macros imply _POSIX_C_SOURCE. Make sure to not
define both these macros and _POSIX_C_SOURCE explicitly to avoid
POSIX requirement conflicts (e.g. _POSIX_C_SOURCE says POSIX.1-2001
but _XOPEN_SOURCE says POSIX.1-2008).

Additionally, there is one special case in render/vulkan/vulkan.c.
That file needs major()/minor(), and these are system-specific.
On FreeBSD, _POSIX_C_SOURCE hides system-specific symbols so we need
to make sure it's not defined for this file. On Linux, we can
explicitly include &lt;sys/sysmacros.h&gt; and ensure that apart from
symbols defined there the file only uses POSIX toys.
</content>
</entry>
<entry>
<title>treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical</title>
<updated>2023-10-03T05:51:07+00:00</updated>
<author>
<name>Alexander Orzechowski</name>
<email>alex@ozal.ski</email>
</author>
<published>2023-10-03T05:51:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/wayland/wlroots.git/commit/?id=1b0694b79481643cb456d03e1be50a1b4f6ca591'/>
<id>urn:sha1:1b0694b79481643cb456d03e1be50a1b4f6ca591</id>
<content type='text'>
</content>
</entry>
<entry>
<title>xwayland: avoid calling xwm_get_atom_name() when debug logs are off</title>
<updated>2023-07-28T12:21:37+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-07-28T12:21:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/wayland/wlroots.git/commit/?id=d40bcfe2c18f057f4bc324a81230f6ba2267db44'/>
<id>urn:sha1:d40bcfe2c18f057f4bc324a81230f6ba2267db44</id>
<content type='text'>
xwm_get_atom_name() performs a roundtrip to the X11 server. Avoid
calling this blocking function if debug logs are turned off.
</content>
</entry>
<entry>
<title>Use wl_container_of() instead of casts</title>
<updated>2023-07-11T18:16:17+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-07-11T15:54:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/wayland/wlroots.git/commit/?id=fe06e5f49a12174ceeb5e307bf5c3d7f623177d5'/>
<id>urn:sha1:fe06e5f49a12174ceeb5e307bf5c3d7f623177d5</id>
<content type='text'>
This slightly improves type safety.

The culprits were found with:

    git grep -E '\([a-z0-9_ ]+ \*\)\W?[a-z]'
</content>
</entry>
<entry>
<title>Use struct initializers instead of memset()</title>
<updated>2023-07-07T15:31:11+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-07-07T12:34:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/wayland/wlroots.git/commit/?id=7a9f8d8d6bf72fcea210552b7bec9b99f342f857'/>
<id>urn:sha1:7a9f8d8d6bf72fcea210552b7bec9b99f342f857</id>
<content type='text'>
This is a bit more type-safe.
</content>
</entry>
<entry>
<title>Zero-initialize structs in init functions</title>
<updated>2022-04-28T08:09:50+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2022-04-26T07:43:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/wayland/wlroots.git/commit/?id=6c350799b22ddc5cb89467c95692437bbf0116b9'/>
<id>urn:sha1:6c350799b22ddc5cb89467c95692437bbf0116b9</id>
<content type='text'>
Ensures there is no field left to its previous undefined value after
calling an init function.
</content>
</entry>
<entry>
<title>gtk-primary-selection: drop support</title>
<updated>2021-04-08T07:50:18+00:00</updated>
<author>
<name>Isaac Freund</name>
<email>ifreund@ifreund.xyz</email>
</author>
<published>2021-04-08T07:42:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/wayland/wlroots.git/commit/?id=78befa59f96bb0a13e9ffeb4df1272738c6b5012'/>
<id>urn:sha1:78befa59f96bb0a13e9ffeb4df1272738c6b5012</id>
<content type='text'>
The standard primary-selection protocol is now widely supported.
</content>
</entry>
<entry>
<title>xwayland/selection: flush connection after changing xwm selection owner</title>
<updated>2021-02-15T12:50:14+00:00</updated>
<author>
<name>Tudor Brindus</name>
<email>me@tbrindus.ca</email>
</author>
<published>2021-02-13T05:22:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/wayland/wlroots.git/commit/?id=2118a3ce47951352ee88bf475124988723d2d20a'/>
<id>urn:sha1:2118a3ce47951352ee88bf475124988723d2d20a</id>
<content type='text'>
This was the actual underlying cause of #2192; we were not getting the
XFIXES_SELECTION_NOTIFY event in time.
</content>
</entry>
<entry>
<title>xwayland/selection: log when proxy window loses ownership</title>
<updated>2021-02-15T12:50:14+00:00</updated>
<author>
<name>Tudor Brindus</name>
<email>me@tbrindus.ca</email>
</author>
<published>2021-02-13T05:22:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/wayland/wlroots.git/commit/?id=2827a9554c8711fe65be7e202e25a6b795c40a9e'/>
<id>urn:sha1:2827a9554c8711fe65be7e202e25a6b795c40a9e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>xwayland/selection: ignore requests for anything but the newest data</title>
<updated>2021-02-15T12:50:14+00:00</updated>
<author>
<name>Tudor Brindus</name>
<email>me@tbrindus.ca</email>
</author>
<published>2021-02-11T01:42:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/wayland/wlroots.git/commit/?id=7d52b4d0b5592a3bc87e097c44b8629695bc9cad'/>
<id>urn:sha1:7d52b4d0b5592a3bc87e097c44b8629695bc9cad</id>
<content type='text'>
Our internal state machine gets screwed up if selection events are not
monotonically increasing in time, and we can enter a self-copy loop from
the proxy window that exhausts all pipes.

Snippet of logs when this occurs:

  00:00:46.238 [wlr] [xwayland/selection/incoming.c:487] XCB_XFIXES_SELECTION_NOTIFY (selection=277, owner=4194626)
  00:00:46.238 [wlr] [xwayland/selection/incoming.c:487] XCB_XFIXES_SELECTION_NOTIFY (selection=277, owner=2097153)
  00:00:46.238 [wlr] [xwayland/selection/outgoing.c:378] XCB_SELECTION_REQUEST (time=58979563 owner=2097153, requestor=2097153 selection=277, target=279, property=278)
  00:00:46.238 [wlr] [xwayland/selection/outgoing.c:397] ignoring old request from timestamp 58979563; expecting &gt; 58979563
  00:00:46.238 [wlr] [xwayland/selection/outgoing.c:29] SendEvent destination=2097153 SelectionNotify(31) time=58979563 requestor=2097153 selection=277 target=279 property=0
  00:00:46.238 [wlr] [xwayland/selection/incoming.c:453] XCB_SELECTION_NOTIFY (selection=277, property=0, target=279)

Note that 2097153 is `selection-&gt;window`, and 4194626 is Emacs.

The race occurs if the selection owner changes back to our proxy window
between when we get `XCB_XFIXES_SELECTION_NOTIFY` for Emacs and when we
call `xcb_convert_selection` in `incoming.c:source_send` -- the
ConvertSelection request can end up hitting our proxy window, but the
timestamp will be rejected.

Fixes #2192.
</content>
</entry>
</feed>
