Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

data-control: Don't send offers to the clients that sent them #2408

Closed
wants to merge 1 commit into from

Conversation

soreau
Copy link
Contributor

@soreau soreau commented Sep 21, 2020

If a client is listening for offers and sends an offer, it will block forever
when it attempts to receive the offer and read from the file descriptor. This
is because the offer is sent back to the client that sent it. Since the writing
and reading ends are in the same client, it never has a chance to write
(barring methods to work around this problem). Even if the client could read
its own selection, it is pointless to do so.

Here we fix the problem by not making offers back to the client that sent them.
The protocol has been updated to reflect this change.
Closes #2406.

If a client is listening for offers and sends an offer, it will block forever
when it attempts to receive the offer and read from the file descriptor. This
is because the offer is sent back to the client that sent it. Since the writing
and reading ends are in the same client, it never has a chance to write
(barring methods to work around this problem). Even if the client could read
its own selection, it is pointless to do so.

Here we fix the problem by not making offers back to the client that sent them.
The protocol has been updated to reflect this change.
Closes swaywm#2406.
@emersion
Copy link
Member

emersion commented Oct 9, 2020

This breaks backwards compatibility and is inconsistent with the core Wayland protocol.

@soreau soreau closed this Oct 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

wlr-data-control makes offers to clients that sent them
2 participants