summaryrefslogtreecommitdiff
path: root/src/xselect.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-12-23 01:43:11 +0000
committerRichard M. Stallman <rms@gnu.org>1993-12-23 01:43:11 +0000
commit8981dc362f8706538f5fabb96a6592ffb0303b72 (patch)
tree57ede82ffd12905341d056305e53babbc71fe421 /src/xselect.c
parentb676aa3998dce8b66fdd21fa2efae317b3a0efa2 (diff)
downloademacs-8981dc362f8706538f5fabb96a6592ffb0303b72.tar.gz
(x_get_foreign_selection): Use x_catch_errors.
(x_handle_selection_clear): Call prepare_menu_bars.
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xselect.c b/src/xselect.c
index b06b5b356fd..943f21d094c 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -741,6 +741,7 @@ x_handle_selection_clear (event)
{
for (; CONSP (rest); rest = Fcdr (rest))
call1 (Fcar (rest), selection_symbol);
+ prepare_menu_bars ();
redisplay_preserve_echo_area ();
}
}
@@ -983,6 +984,7 @@ x_get_foreign_selection (selection_symbol, target_type)
type_atom = symbol_to_x_atom (display, target_type);
BLOCK_INPUT;
+ x_catch_errors ();
XConvertSelection (display, selection_atom, type_atom, target_property,
requestor_window, requestor_time);
XFlushQueue ();
@@ -998,6 +1000,11 @@ x_get_foreign_selection (selection_symbol, target_type)
usecs = (x_selection_timeout % 1000) * 1000;
wait_reading_process_input (secs, usecs, reading_selection_reply, 0);
+ BLOCK_INPUT;
+ x_check_errors ("Cannot get selection: %s");
+ x_uncatch_errors ();
+ UNBLOCK_INPUT;
+
if (NILP (XCONS (reading_selection_reply)->car))
error ("timed out waiting for reply from selection owner");