aboutsummaryrefslogtreecommitdiffstats
path: root/src/xselect.c
diff options
context:
space:
mode:
authorKarl Heuer1996-01-04 22:58:25 +0000
committerKarl Heuer1996-01-04 22:58:25 +0000
commit2a1a4c9d30dc3b36dd3e81edde18cd97ff6bb15a (patch)
treed1dd2e6db1d8fa7de6e73dc3847196db465d47d0 /src/xselect.c
parentb952f106893975815d0fea49331ed0ee757442ea (diff)
downloademacs-2a1a4c9d30dc3b36dd3e81edde18cd97ff6bb15a.tar.gz
emacs-2a1a4c9d30dc3b36dd3e81edde18cd97ff6bb15a.zip
(x_get_foreign_selection): Renamed local variables
requester_window (from requestor_window), requester_time (from requestor_time). (syms_of_xselect): Doc fix for x-selection-timeout.
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/xselect.c b/src/xselect.c
index b7360a10383..da22c715af2 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -384,7 +384,7 @@ x_get_local_selection (selection_symbol, target_type)
384 384
385/* Subroutines of x_reply_selection_request. */ 385/* Subroutines of x_reply_selection_request. */
386 386
387/* Send a SelectionNotify event to the requestor with property=None, 387/* Send a SelectionNotify event to the requester with property=None,
388 meaning we were unable to do what they wanted. */ 388 meaning we were unable to do what they wanted. */
389 389
390static void 390static void
@@ -394,14 +394,14 @@ x_decline_selection_request (event)
394 XSelectionEvent reply; 394 XSelectionEvent reply;
395 reply.type = SelectionNotify; 395 reply.type = SelectionNotify;
396 reply.display = SELECTION_EVENT_DISPLAY (event); 396 reply.display = SELECTION_EVENT_DISPLAY (event);
397 reply.requestor = SELECTION_EVENT_REQUESTOR (event); 397 reply.requester = SELECTION_EVENT_REQUESTER (event);
398 reply.selection = SELECTION_EVENT_SELECTION (event); 398 reply.selection = SELECTION_EVENT_SELECTION (event);
399 reply.time = SELECTION_EVENT_TIME (event); 399 reply.time = SELECTION_EVENT_TIME (event);
400 reply.target = SELECTION_EVENT_TARGET (event); 400 reply.target = SELECTION_EVENT_TARGET (event);
401 reply.property = None; 401 reply.property = None;
402 402
403 BLOCK_INPUT; 403 BLOCK_INPUT;
404 XSendEvent (reply.display, reply.requestor, False, 0L, 404 XSendEvent (reply.display, reply.requester, False, 0L,
405 (XEvent *) &reply); 405 (XEvent *) &reply);
406 XFlush (reply.display); 406 XFlush (reply.display);
407 UNBLOCK_INPUT; 407 UNBLOCK_INPUT;
@@ -412,7 +412,7 @@ x_decline_selection_request (event)
412static struct input_event *x_selection_current_request; 412static struct input_event *x_selection_current_request;
413 413
414/* Used as an unwind-protect clause so that, if a selection-converter signals 414/* Used as an unwind-protect clause so that, if a selection-converter signals
415 an error, we tell the requestor that we were unable to do what they wanted 415 an error, we tell the requester that we were unable to do what they wanted
416 before we throw to top-level or go into the debugger or whatever. */ 416 before we throw to top-level or go into the debugger or whatever. */
417 417
418static Lisp_Object 418static Lisp_Object
@@ -498,7 +498,7 @@ x_reply_selection_request (event, format, data, size, type)
498{ 498{
499 XSelectionEvent reply; 499 XSelectionEvent reply;
500 Display *display = SELECTION_EVENT_DISPLAY (event); 500 Display *display = SELECTION_EVENT_DISPLAY (event);
501 Window window = SELECTION_EVENT_REQUESTOR (event); 501 Window window = SELECTION_EVENT_REQUESTER (event);
502 int bytes_remaining; 502 int bytes_remaining;
503 int format_bytes = format/8; 503 int format_bytes = format/8;
504 int max_bytes = SELECTION_QUANTUM (display); 504 int max_bytes = SELECTION_QUANTUM (display);
@@ -509,7 +509,7 @@ x_reply_selection_request (event, format, data, size, type)
509 509
510 reply.type = SelectionNotify; 510 reply.type = SelectionNotify;
511 reply.display = display; 511 reply.display = display;
512 reply.requestor = window; 512 reply.requester = window;
513 reply.selection = SELECTION_EVENT_SELECTION (event); 513 reply.selection = SELECTION_EVENT_SELECTION (event);
514 reply.time = SELECTION_EVENT_TIME (event); 514 reply.time = SELECTION_EVENT_TIME (event);
515 reply.target = SELECTION_EVENT_TARGET (event); 515 reply.target = SELECTION_EVENT_TARGET (event);
@@ -576,7 +576,7 @@ x_reply_selection_request (event, format, data, size, type)
576 had_errors = x_had_errors_p (display); 576 had_errors = x_had_errors_p (display);
577 UNBLOCK_INPUT; 577 UNBLOCK_INPUT;
578 578
579 /* First, wait for the requestor to ack by deleting the property. 579 /* First, wait for the requester to ack by deleting the property.
580 This can run random lisp code (process handlers) or signal. */ 580 This can run random lisp code (process handlers) or signal. */
581 if (! had_errors) 581 if (! had_errors)
582 wait_for_property_change (wait_object); 582 wait_for_property_change (wait_object);
@@ -607,12 +607,12 @@ x_reply_selection_request (event, format, data, size, type)
607 if (had_errors) 607 if (had_errors)
608 break; 608 break;
609 609
610 /* Now wait for the requestor to ack this chunk by deleting the 610 /* Now wait for the requester to ack this chunk by deleting the
611 property. This can run random lisp code or signal. 611 property. This can run random lisp code or signal.
612 */ 612 */
613 wait_for_property_change (wait_object); 613 wait_for_property_change (wait_object);
614 } 614 }
615 /* Now write a zero-length chunk to the property to tell the requestor 615 /* Now write a zero-length chunk to the property to tell the requester
616 that we're done. */ 616 that we're done. */
617#if 0 617#if 0
618 fprintf (stderr," INCR done\n"); 618 fprintf (stderr," INCR done\n");
@@ -1030,7 +1030,7 @@ fetch_multiple_target (event)
1030 XSelectionRequestEvent *event; 1030 XSelectionRequestEvent *event;
1031{ 1031{
1032 Display *display = event->display; 1032 Display *display = event->display;
1033 Window window = event->requestor; 1033 Window window = event->requester;
1034 Atom target = event->target; 1034 Atom target = event->target;
1035 Atom selection_atom = event->selection; 1035 Atom selection_atom = event->selection;
1036 int result; 1036 int result;
@@ -1085,10 +1085,10 @@ static Lisp_Object
1085x_get_foreign_selection (selection_symbol, target_type) 1085x_get_foreign_selection (selection_symbol, target_type)
1086 Lisp_Object selection_symbol, target_type; 1086 Lisp_Object selection_symbol, target_type;
1087{ 1087{
1088 Window requestor_window = FRAME_X_WINDOW (selected_frame); 1088 Window requester_window = FRAME_X_WINDOW (selected_frame);
1089 Display *display = FRAME_X_DISPLAY (selected_frame); 1089 Display *display = FRAME_X_DISPLAY (selected_frame);
1090 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (selected_frame); 1090 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (selected_frame);
1091 Time requestor_time = last_event_timestamp; 1091 Time requester_time = last_event_timestamp;
1092 Atom target_property = dpyinfo->Xatom_EMACS_TMP; 1092 Atom target_property = dpyinfo->Xatom_EMACS_TMP;
1093 Atom selection_atom = symbol_to_x_atom (dpyinfo, display, selection_symbol); 1093 Atom selection_atom = symbol_to_x_atom (dpyinfo, display, selection_symbol);
1094 Atom type_atom; 1094 Atom type_atom;
@@ -1104,11 +1104,11 @@ x_get_foreign_selection (selection_symbol, target_type)
1104 BLOCK_INPUT; 1104 BLOCK_INPUT;
1105 x_catch_errors (display); 1105 x_catch_errors (display);
1106 XConvertSelection (display, selection_atom, type_atom, target_property, 1106 XConvertSelection (display, selection_atom, type_atom, target_property,
1107 requestor_window, requestor_time); 1107 requester_window, requester_time);
1108 XFlush (display); 1108 XFlush (display);
1109 1109
1110 /* Prepare to block until the reply has been read. */ 1110 /* Prepare to block until the reply has been read. */
1111 reading_selection_window = requestor_window; 1111 reading_selection_window = requester_window;
1112 reading_which_selection = selection_atom; 1112 reading_which_selection = selection_atom;
1113 XCONS (reading_selection_reply)->car = Qnil; 1113 XCONS (reading_selection_reply)->car = Qnil;
1114 1114
@@ -1142,7 +1142,7 @@ x_get_foreign_selection (selection_symbol, target_type)
1142 1142
1143 /* Otherwise, the selection is waiting for us on the requested property. */ 1143 /* Otherwise, the selection is waiting for us on the requested property. */
1144 return 1144 return
1145 x_get_window_property_as_lisp_data (display, requestor_window, 1145 x_get_window_property_as_lisp_data (display, requester_window,
1146 target_property, target_type, 1146 target_property, target_type,
1147 selection_atom); 1147 selection_atom);
1148} 1148}
@@ -1196,7 +1196,7 @@ x_get_window_property (display, window, property, data_ret, bytes_ret,
1196 total_size = bytes_remaining + 1; 1196 total_size = bytes_remaining + 1;
1197 *data_ret = (unsigned char *) xmalloc (total_size); 1197 *data_ret = (unsigned char *) xmalloc (total_size);
1198 1198
1199 /* Now read, until weve gotten it all. */ 1199 /* Now read, until we've gotten it all. */
1200 while (bytes_remaining) 1200 while (bytes_remaining)
1201 { 1201 {
1202#if 0 1202#if 0
@@ -1273,7 +1273,7 @@ receive_incremental_selection (display, window, property, target_type,
1273 int tmp_size_bytes; 1273 int tmp_size_bytes;
1274 wait_for_property_change (wait_object); 1274 wait_for_property_change (wait_object);
1275 /* expect it again immediately, because x_get_window_property may 1275 /* expect it again immediately, because x_get_window_property may
1276 .. no it wont, I dont get it. 1276 .. no it won't, I don't get it.
1277 .. Ok, I get it now, the Xt code that implements INCR is broken. 1277 .. Ok, I get it now, the Xt code that implements INCR is broken.
1278 */ 1278 */
1279 x_get_window_property (display, window, property, 1279 x_get_window_property (display, window, property,
@@ -1697,7 +1697,7 @@ void
1697x_handle_selection_notify (event) 1697x_handle_selection_notify (event)
1698 XSelectionEvent *event; 1698 XSelectionEvent *event;
1699{ 1699{
1700 if (event->requestor != reading_selection_window) 1700 if (event->requester != reading_selection_window)
1701 return; 1701 return;
1702 if (event->selection != reading_which_selection) 1702 if (event->selection != reading_which_selection)
1703 return; 1703 return;
@@ -2142,7 +2142,7 @@ it merely informs you that they have happened.");
2142 2142
2143 DEFVAR_INT ("x-selection-timeout", &x_selection_timeout, 2143 DEFVAR_INT ("x-selection-timeout", &x_selection_timeout,
2144 "Number of milliseconds to wait for a selection reply.\n\ 2144 "Number of milliseconds to wait for a selection reply.\n\
2145If the selection owner doens't reply in this time, we give up.\n\ 2145If the selection owner doesn't reply in this time, we give up.\n\
2146A value of 0 means wait as long as necessary. This is initialized from the\n\ 2146A value of 0 means wait as long as necessary. This is initialized from the\n\
2147\"*selectionTimeout\" resource."); 2147\"*selectionTimeout\" resource.");
2148 x_selection_timeout = 0; 2148 x_selection_timeout = 0;