Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1527 from johnchen902/fix-sway-3545-2
Browse files Browse the repository at this point in the history
Fix another instance of swaywm/sway#3545.
  • Loading branch information
ddevault authored Feb 3, 2019
2 parents f24e172 + 819bd3e commit 04c9ca4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xwayland/selection/dnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
Expand Down

0 comments on commit 04c9ca4

Please sign in to comment.