[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xterm.c [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/xterm.c [emacs-unicode-2] |
Date: |
Thu, 11 Nov 2004 22:19:01 -0500 |
Index: emacs/src/xterm.c
diff -c emacs/src/xterm.c:1.804.2.17 emacs/src/xterm.c:1.804.2.18
*** emacs/src/xterm.c:1.804.2.17 Thu Nov 4 08:55:34 2004
--- emacs/src/xterm.c Fri Nov 12 02:52:58 2004
***************
*** 5581,5653 ****
}
- /* Define a queue to save up SelectionRequest events for later handling. */
-
- struct selection_event_queue
- {
- XEvent event;
- struct selection_event_queue *next;
- };
-
- static struct selection_event_queue *queue;
-
- /* Nonzero means queue up certain events--don't process them yet. */
-
- static int x_queue_selection_requests;
-
- /* Queue up an X event *EVENT, to be processed later. */
-
- static void
- x_queue_event (f, event)
- FRAME_PTR f;
- XEvent *event;
- {
- struct selection_event_queue *queue_tmp
- = (struct selection_event_queue *) xmalloc (sizeof (struct
selection_event_queue));
-
- if (queue_tmp != NULL)
- {
- queue_tmp->event = *event;
- queue_tmp->next = queue;
- queue = queue_tmp;
- }
- }
-
- /* Take all the queued events and put them back
- so that they get processed afresh. */
-
- static void
- x_unqueue_events (display)
- Display *display;
- {
- while (queue != NULL)
- {
- struct selection_event_queue *queue_tmp = queue;
- XPutBackEvent (display, &queue_tmp->event);
- queue = queue_tmp->next;
- xfree ((char *)queue_tmp);
- }
- }
-
- /* Start queuing SelectionRequest events. */
-
- void
- x_start_queuing_selection_requests (display)
- Display *display;
- {
- x_queue_selection_requests++;
- }
-
- /* Stop queuing SelectionRequest events. */
-
- void
- x_stop_queuing_selection_requests (display)
- Display *display;
- {
- x_queue_selection_requests--;
- x_unqueue_events (display);
- }
-
/* The main X event-reading loop - XTread_socket. */
#if 0
--- 5581,5586 ----
***************
*** 6025,6035 ****
if (!x_window_to_frame (dpyinfo, event.xselectionrequest.owner))
goto OTHER;
#endif /* USE_X_TOOLKIT */
! if (x_queue_selection_requests)
! x_queue_event (x_window_to_frame (dpyinfo,
event.xselectionrequest.owner),
! &event);
! else
! {
XSelectionRequestEvent *eventp
= (XSelectionRequestEvent *) &event;
--- 5958,5964 ----
if (!x_window_to_frame (dpyinfo, event.xselectionrequest.owner))
goto OTHER;
#endif /* USE_X_TOOLKIT */
! {
XSelectionRequestEvent *eventp
= (XSelectionRequestEvent *) &event;
***************
*** 6041,6047 ****
SELECTION_EVENT_PROPERTY (&inev) = eventp->property;
SELECTION_EVENT_TIME (&inev) = eventp->time;
inev.frame_or_window = Qnil;
! }
break;
case PropertyNotify:
--- 5970,5976 ----
SELECTION_EVENT_PROPERTY (&inev) = eventp->property;
SELECTION_EVENT_TIME (&inev) = eventp->time;
inev.frame_or_window = Qnil;
! }
break;
case PropertyNotify:
***************
*** 7626,7632 ****
/* The display may have been closed before this function is called.
Check if it is still open before calling XSync. */
if (x_display_info_for_display (dpy) != 0)
! XSync (dpy, False);
x_error_message_string = XCDR (old_val);
return Qnil;
--- 7555,7565 ----
/* The display may have been closed before this function is called.
Check if it is still open before calling XSync. */
if (x_display_info_for_display (dpy) != 0)
! {
! BLOCK_INPUT;
! XSync (dpy, False);
! UNBLOCK_INPUT;
! }
x_error_message_string = XCDR (old_val);
return Qnil;