aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTudor Brindus <me@tbrindus.ca>2021-01-29 19:00:17 -0500
committerSimon Ser <contact@emersion.fr>2021-01-31 10:24:59 +0100
commitb6ba595862a55e5e2899d4c38dd22a1f8ffcabaa (patch)
tree76988b43a8127bd2d9df65af5c79c085234ec95f /include
parent3417fc0cca8d392d0154012b3fd8149e71f25c6d (diff)
xwayland/selection: destroy all selections on Xwayland restart
Previously, Xwayland could restart, and we'd get events for transfers pointing to the previous (now freed) xwm instance. This led to use-after-free segfaults. Closes #2565.
Diffstat (limited to 'include')
-rw-r--r--include/xwayland/selection.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/xwayland/selection.h b/include/xwayland/selection.h
index 5e65e8bb..3f00fd54 100644
--- a/include/xwayland/selection.h
+++ b/include/xwayland/selection.h
@@ -51,6 +51,9 @@ void xwm_selection_transfer_finish(struct wlr_xwm_selection_transfer *transfer);
bool xwm_selection_transfer_get_selection_property(
struct wlr_xwm_selection_transfer *transfer, bool delete);
+void xwm_selection_transfer_destroy_outgoing(
+ struct wlr_xwm_selection_transfer *transfer);
+
xcb_atom_t xwm_mime_type_to_atom(struct wlr_xwm *xwm, char *mime_type);
char *xwm_mime_type_from_atom(struct wlr_xwm *xwm, xcb_atom_t atom);
struct wlr_xwm_selection *xwm_get_selection(struct wlr_xwm *xwm,