aboutsummaryrefslogtreecommitdiff
path: root/xwayland/selection/selection.c
diff options
context:
space:
mode:
authorTudor Brindus <me@tbrindus.ca>2021-01-30 14:58:27 -0500
committerSimon Ser <contact@emersion.fr>2021-01-31 19:17:04 +0100
commitb3d782f81877088da496006892f8522299e40ccb (patch)
tree43f605965f0f64e0882583e7bd2897e1135879db /xwayland/selection/selection.c
parentaa86a022fa00edd0723ff48a6765ee7fbddefadc (diff)
xwayland/selection: introduce `xwm_selection_transfer_init`
Currently, all this does is initialize `wl_client_fd` to -1, so that comparisons with 0 are meaningful.
Diffstat (limited to 'xwayland/selection/selection.c')
-rw-r--r--xwayland/selection/selection.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xwayland/selection/selection.c b/xwayland/selection/selection.c
index 64c957b7..08d04178 100644
--- a/xwayland/selection/selection.c
+++ b/xwayland/selection/selection.c
@@ -32,6 +32,10 @@ void xwm_selection_transfer_destroy_property_reply(
transfer->property_reply = NULL;
}
+void xwm_selection_transfer_init(struct wlr_xwm_selection_transfer *transfer) {
+ transfer->wl_client_fd = -1;
+}
+
void xwm_selection_transfer_finish(
struct wlr_xwm_selection_transfer *transfer) {
transfer->incr = false;
@@ -182,6 +186,7 @@ static void selection_init(struct wlr_xwm *xwm,
selection->window = xwm->selection_window;
selection->incoming.selection = selection;
wl_list_init(&selection->outgoing);
+ xwm_selection_transfer_init(&selection->incoming);
uint32_t mask =
XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER |