]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove unnecessary error checks in xselect.c
authorPo Lu <luangruo@yahoo.com>
Thu, 1 Dec 2022 06:51:29 +0000 (14:51 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 1 Dec 2022 06:51:29 +0000 (14:51 +0800)
* src/xselect.c (x_own_selection): Don't sync around
XSetSelectionOwner, as the atom and window specified are always
correct.

src/xselect.c

index 85dcfbc24625428bda1f295362194611240d7ba7..c47093dfad071c463abb537d895f9fc87d02119d 100644 (file)
@@ -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 */