From 1d36f7655d7844b943c3ad8f789b51e72516b857 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 1 Dec 2022 15:42:34 -0600 Subject: [PATCH] xwm: Assert if we try to fetch our own selection Now that we don't accidentally delay our selection ownership changes, let's assert() if we somehow find ourselves downloading our own selection, as the assertion is simpler to understand than the mess that ensues if we hit this. Signed-off-by: Derek Foreman --- xwayland/selection.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xwayland/selection.c b/xwayland/selection.c index a93b12416..c243aa2da 100644 --- a/xwayland/selection.c +++ b/xwayland/selection.c @@ -25,6 +25,7 @@ #include "config.h" +#include #include #include #include @@ -590,6 +591,7 @@ weston_wm_handle_selection_request(struct weston_wm *wm, weston_log_continue("property %s\n", get_atom_name(wm->conn, selection_request->property)); + assert(selection_request->requestor != wm->selection_window); wm->selection_request = *selection_request; wm->incr = 0; wm->flush_property_on_delete = 0;