From f19ab1d36c5a39732bef31bc88766b67094b96e7 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 1 Dec 2022 14:51:29 +0800 Subject: [PATCH] Remove unnecessary error checks in xselect.c * src/xselect.c (x_own_selection): Don't sync around XSetSelectionOwner, as the atom and window specified are always correct. --- src/xselect.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/xselect.c b/src/xselect.c index 85dcfbc2462..c47093dfad0 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -285,10 +285,8 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value, timestamp = dpyinfo->last_user_time; block_input (); - x_catch_errors (display); - XSetSelectionOwner (display, selection_atom, selecting_window, timestamp); - x_check_errors (display, "Can't set selection: %s"); - x_uncatch_errors_after_check (); + XSetSelectionOwner (display, selection_atom, selecting_window, + timestamp); unblock_input (); /* Now update the local cache */ -- 2.39.2