aboutsummaryrefslogtreecommitdiff
path: root/xwayland/selection
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-02-03 09:56:59 +0100
committerGitHub <noreply@github.com>2019-02-03 09:56:59 +0100
commit04c9ca4198a729a95a6368bbbf0438d1ba3465fa (patch)
tree9faaf28f78866f3e533a8e3f1ee2d7e58715838b /xwayland/selection
parentf24e17259e49aef55b7ada54793a4cdb49ae94a1 (diff)
parent819bd3e344d66a4616ae91eeaf6267bae23fca18 (diff)
Merge pull request #1527 from johnchen902/fix-sway-3545-2
Fix another instance of swaywm/sway#3545.
Diffstat (limited to 'xwayland/selection')
-rw-r--r--xwayland/selection/dnd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xwayland/selection/dnd.c b/xwayland/selection/dnd.c
index ec5f16c7..fc090936 100644
--- a/xwayland/selection/dnd.c
+++ b/xwayland/selection/dnd.c
@@ -315,6 +315,8 @@ static void seat_handle_drag_source_destroy(struct wl_listener *listener,
wl_container_of(listener, xwm, seat_drag_source_destroy);
wl_list_remove(&xwm->seat_drag_source_destroy.link);
+ xwm->seat_drag_source_destroy.link.prev = NULL;
+ xwm->seat_drag_source_destroy.link.next = NULL;
xwm->drag_focus = NULL;
}
@@ -332,6 +334,9 @@ void xwm_seat_handle_start_drag(struct wlr_xwm *xwm, struct wlr_drag *drag) {
wl_signal_add(&drag->events.destroy, &xwm->seat_drag_destroy);
xwm->seat_drag_destroy.notify = seat_handle_drag_destroy;
+ if (xwm->seat_drag_source_destroy.link.prev != NULL) {
+ wl_list_remove(&xwm->seat_drag_source_destroy.link);
+ }
wl_signal_add(&drag->source->events.destroy,
&xwm->seat_drag_source_destroy);
xwm->seat_drag_source_destroy.notify = seat_handle_drag_source_destroy;