From b3d782f81877088da496006892f8522299e40ccb Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Sat, 30 Jan 2021 14:58:27 -0500 Subject: 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. --- xwayland/selection/selection.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xwayland/selection/selection.c') 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 | -- cgit v1.2.3