aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorKaroly Lorentey2004-11-06 17:52:02 +0000
committerKaroly Lorentey2004-11-06 17:52:02 +0000
commit65ea79492334e2ef7b5b4e0d23b6f68ba2f4d0bb (patch)
tree853cf391ca1abda4f4ccd6fe8e7bb43f7c86ee08 /src/xterm.c
parente0bc17abe6979d607e8de4684dddb96e53c60065 (diff)
parent392cf16dd0ee9358f8af0cd0d8048b822456bbeb (diff)
downloademacs-65ea79492334e2ef7b5b4e0d23b6f68ba2f4d0bb.tar.gz
emacs-65ea79492334e2ef7b5b4e0d23b6f68ba2f4d0bb.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-653 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-654 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-655 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-656 Update from CVS: lisp/man.el (Man-xref-normal-file): Fix help-echo. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-657 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-658 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-659 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-660 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-661 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-662 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-663 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-664 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-665 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-666 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-667 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-668 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-669 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-670 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-671 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-64 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-65 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-66 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-67 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-68 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-264
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c85
1 files changed, 9 insertions, 76 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 492e8d00b52..a1fd1d5dcc2 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3922,9 +3922,9 @@ x_window_to_scroll_bar (display, window_id)
3922{ 3922{
3923 Lisp_Object tail; 3923 Lisp_Object tail;
3924 3924
3925#ifdef USE_GTK 3925#if defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS)
3926 window_id = (Window) xg_get_scroll_id_for_window (display, window_id); 3926 window_id = (Window) xg_get_scroll_id_for_window (display, window_id);
3927#endif /* USE_GTK */ 3927#endif /* USE_GTK && USE_TOOLKIT_SCROLL_BARS */
3928 3928
3929 for (tail = Vframe_list; 3929 for (tail = Vframe_list;
3930 XGCTYPE (tail) == Lisp_Cons; 3930 XGCTYPE (tail) == Lisp_Cons;
@@ -5579,73 +5579,6 @@ x_scroll_bar_clear (f)
5579} 5579}
5580 5580
5581 5581
5582/* Define a queue to save up SelectionRequest events for later handling. */
5583
5584struct selection_event_queue
5585 {
5586 XEvent event;
5587 struct selection_event_queue *next;
5588 };
5589
5590static struct selection_event_queue *queue;
5591
5592/* Nonzero means queue up certain events--don't process them yet. */
5593
5594static int x_queue_selection_requests;
5595
5596/* Queue up an X event *EVENT, to be processed later. */
5597
5598static void
5599x_queue_event (f, event)
5600 FRAME_PTR f;
5601 XEvent *event;
5602{
5603 struct selection_event_queue *queue_tmp
5604 = (struct selection_event_queue *) xmalloc (sizeof (struct selection_event_queue));
5605
5606 if (queue_tmp != NULL)
5607 {
5608 queue_tmp->event = *event;
5609 queue_tmp->next = queue;
5610 queue = queue_tmp;
5611 }
5612}
5613
5614/* Take all the queued events and put them back
5615 so that they get processed afresh. */
5616
5617static void
5618x_unqueue_events (display)
5619 Display *display;
5620{
5621 while (queue != NULL)
5622 {
5623 struct selection_event_queue *queue_tmp = queue;
5624 XPutBackEvent (display, &queue_tmp->event);
5625 queue = queue_tmp->next;
5626 xfree ((char *)queue_tmp);
5627 }
5628}
5629
5630/* Start queuing SelectionRequest events. */
5631
5632void
5633x_start_queuing_selection_requests (display)
5634 Display *display;
5635{
5636 x_queue_selection_requests++;
5637}
5638
5639/* Stop queuing SelectionRequest events. */
5640
5641void
5642x_stop_queuing_selection_requests (display)
5643 Display *display;
5644{
5645 x_queue_selection_requests--;
5646 x_unqueue_events (display);
5647}
5648
5649/* The main X event-reading loop - XTread_socket. */ 5582/* The main X event-reading loop - XTread_socket. */
5650 5583
5651#if 0 5584#if 0
@@ -6023,11 +5956,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6023 if (!x_window_to_frame (dpyinfo, event.xselectionrequest.owner)) 5956 if (!x_window_to_frame (dpyinfo, event.xselectionrequest.owner))
6024 goto OTHER; 5957 goto OTHER;
6025#endif /* USE_X_TOOLKIT */ 5958#endif /* USE_X_TOOLKIT */
6026 if (x_queue_selection_requests) 5959 {
6027 x_queue_event (x_window_to_frame (dpyinfo, event.xselectionrequest.owner),
6028 &event);
6029 else
6030 {
6031 XSelectionRequestEvent *eventp 5960 XSelectionRequestEvent *eventp
6032 = (XSelectionRequestEvent *) &event; 5961 = (XSelectionRequestEvent *) &event;
6033 5962
@@ -6039,7 +5968,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6039 SELECTION_EVENT_PROPERTY (&inev) = eventp->property; 5968 SELECTION_EVENT_PROPERTY (&inev) = eventp->property;
6040 SELECTION_EVENT_TIME (&inev) = eventp->time; 5969 SELECTION_EVENT_TIME (&inev) = eventp->time;
6041 inev.frame_or_window = Qnil; 5970 inev.frame_or_window = Qnil;
6042 } 5971 }
6043 break; 5972 break;
6044 5973
6045 case PropertyNotify: 5974 case PropertyNotify:
@@ -7623,7 +7552,11 @@ x_catch_errors_unwind (old_val)
7623 /* The display may have been closed before this function is called. 7552 /* The display may have been closed before this function is called.
7624 Check if it is still open before calling XSync. */ 7553 Check if it is still open before calling XSync. */
7625 if (x_display_info_for_display (dpy) != 0) 7554 if (x_display_info_for_display (dpy) != 0)
7626 XSync (dpy, False); 7555 {
7556 BLOCK_INPUT;
7557 XSync (dpy, False);
7558 UNBLOCK_INPUT;
7559 }
7627 7560
7628 x_error_message_string = XCDR (old_val); 7561 x_error_message_string = XCDR (old_val);
7629 return Qnil; 7562 return Qnil;