diff options
author | emersion <contact@emersion.fr> | 2019-02-05 10:49:28 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-02-05 18:43:06 +0100 |
commit | 556bf3ac31be8714d9b9cb92f000a161f5132d8c (patch) | |
tree | 156b9c321d21dfede7b37d45a85a25f5b8df5674 /xwayland/selection | |
parent | b2f56ad4a84229239f55a6e0235fa7b76a9b2feb (diff) |
data-device: destroy previous source when starting drag
This supersedes f24e17259e49aef55b7ada54793a4cdb49ae94a1 and
04c9ca4198a729a95a6368bbbf0438d1ba3465fa. These commits were manually removing
wlr_data_source destroy handlers when starting a new drag. This is error-prone.
Instead, this commit destroys the previous source whenever we start a new drag.
Diffstat (limited to 'xwayland/selection')
-rw-r--r-- | xwayland/selection/dnd.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/xwayland/selection/dnd.c b/xwayland/selection/dnd.c index fc090936..ec5f16c7 100644 --- a/xwayland/selection/dnd.c +++ b/xwayland/selection/dnd.c @@ -315,8 +315,6 @@ 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; } @@ -334,9 +332,6 @@ 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; |