aboutsummaryrefslogtreecommitdiff
path: root/xwayland/selection
diff options
context:
space:
mode:
authorTudor Brindus <me@tbrindus.ca>2021-01-25 20:02:54 -0500
committerSimon Ser <contact@emersion.fr>2021-01-29 10:18:03 +0100
commit40b2e7669a39a4371cd9761face9ca70f083e5c6 (patch)
tree8b29ea5a085dde091db3ad3193ab16adb9e08ea3 /xwayland/selection
parent8aa38fe73e0866c389fa973dd1e04a82979f55ac (diff)
xwayland/selection: make `xwm_data_source_write` return 0 on failure
The `fd` is marked `O_NONBLOCK`, so `write` will never spuriously return `EINTR`. Therefore, `write` failing is permanent, and we can return 0 to make the return value meaningful.
Diffstat (limited to 'xwayland/selection')
-rw-r--r--xwayland/selection/incoming.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xwayland/selection/incoming.c b/xwayland/selection/incoming.c
index db39ae75..305bc196 100644
--- a/xwayland/selection/incoming.c
+++ b/xwayland/selection/incoming.c
@@ -28,7 +28,7 @@ static int xwm_data_source_write(int fd, uint32_t mask, void *data) {
xwm_selection_transfer_destroy_property_reply(transfer);
xwm_selection_transfer_remove_event_source(transfer);
xwm_selection_transfer_close_wl_client_fd(transfer);
- return 1;
+ return 0;
}
wlr_log(WLR_DEBUG, "wrote %zd (chunk size %zd) of %d bytes",