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>
This commit is contained in:
Derek Foreman 2022-12-01 15:42:34 -06:00 committed by Marius Vlad
parent 11bcad116f
commit 1d36f7655d
1 changed files with 2 additions and 0 deletions

View File

@ -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;