aboutsummaryrefslogtreecommitdiff
path: root/xwayland/selection/incoming.c
diff options
context:
space:
mode:
authorTudor Brindus <me@tbrindus.ca>2021-01-28 22:49:46 -0500
committerSimon Ser <contact@emersion.fr>2021-01-29 10:18:03 +0100
commit211c1e23be4a115a462ce9b6ee4032ad7b893b14 (patch)
treed30df681da499e617588744b0718acb06b308627 /xwayland/selection/incoming.c
parent703c17ae41a7ebc597a433a37854ec5109dc4a58 (diff)
xwayland/selection: end incr transfer on empty prop, not next selection
Previously, `transfer->incr` was being cleared on the next selection. However, if the next selection was *also* incremental, it's possible that `xwm_handle_selection_property_notify` would route us to `xwm_get_incr_chunk` instead of `xwm_selection_get_data`.
Diffstat (limited to 'xwayland/selection/incoming.c')
-rw-r--r--xwayland/selection/incoming.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xwayland/selection/incoming.c b/xwayland/selection/incoming.c
index 3402d9a4..91ab7767 100644
--- a/xwayland/selection/incoming.c
+++ b/xwayland/selection/incoming.c
@@ -100,8 +100,8 @@ void xwm_get_incr_chunk(struct wlr_xwm_selection_transfer *transfer) {
if (xcb_get_property_value_length(transfer->property_reply) > 0) {
xwm_write_selection_property_to_wl_client(transfer);
} else {
- xwm_selection_transfer_finish(transfer);
wlr_log(WLR_DEBUG, "incremental transfer complete");
+ xwm_selection_transfer_finish(transfer);
}
}
@@ -117,7 +117,6 @@ static void xwm_selection_get_data(struct wlr_xwm_selection *selection) {
transfer->incr = true;
xwm_selection_transfer_destroy_property_reply(transfer);
} else {
- transfer->incr = false;
// Reply's ownership is transferred to wm, which is responsible for freeing
// it.
xwm_write_selection_property_to_wl_client(transfer);