diff options
author | Derek Foreman <derek.foreman@collabora.com> | 2022-12-01 15:42:34 -0600 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2022-12-07 10:03:37 +0200 |
commit | 1d36f7655d7844b943c3ad8f789b51e72516b857 (patch) | |
tree | 43c3f883d09f736322de1e4cde84435d3a7ffc67 | |
parent | 11bcad116f5cc1eb76c2de83d8c39af0cdb71a81 (diff) | |
download | weston-1d36f7655d7844b943c3ad8f789b51e72516b857.tar.gz |
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 <derek.foreman@collabora.com>
-rw-r--r-- | xwayland/selection.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xwayland/selection.c b/xwayland/selection.c index a93b1241..c243aa2d 100644 --- a/xwayland/selection.c +++ b/xwayland/selection.c @@ -25,6 +25,7 @@ #include "config.h" +#include <assert.h> #include <stdint.h> #include <stdlib.h> #include <string.h> @@ -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; |