diff options
| author | Karoly Lorentey | 2004-11-06 17:52:02 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-11-06 17:52:02 +0000 |
| commit | 65ea79492334e2ef7b5b4e0d23b6f68ba2f4d0bb (patch) | |
| tree | 853cf391ca1abda4f4ccd6fe8e7bb43f7c86ee08 /src/keyboard.c | |
| parent | e0bc17abe6979d607e8de4684dddb96e53c60065 (diff) | |
| parent | 392cf16dd0ee9358f8af0cd0d8048b822456bbeb (diff) | |
| download | emacs-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/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 91 |
1 files changed, 25 insertions, 66 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 475479b66a3..35bfd1402c9 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3694,36 +3694,26 @@ kbd_buffer_store_event_hold (event, hold_quit) | |||
| 3694 | Discard the event if it would fill the last slot. */ | 3694 | Discard the event if it would fill the last slot. */ |
| 3695 | if (kbd_fetch_ptr - 1 != kbd_store_ptr) | 3695 | if (kbd_fetch_ptr - 1 != kbd_store_ptr) |
| 3696 | { | 3696 | { |
| 3697 | *kbd_store_ptr = *event; | ||
| 3698 | ++kbd_store_ptr; | ||
| 3699 | } | ||
| 3700 | } | ||
| 3697 | 3701 | ||
| 3698 | #if 0 /* The SELECTION_REQUEST_EVENT case looks bogus, and it's error | ||
| 3699 | prone to assign individual members for other events, in case | ||
| 3700 | the input_event structure is changed. --2000-07-13, gerd. */ | ||
| 3701 | struct input_event *sp = kbd_store_ptr; | ||
| 3702 | sp->kind = event->kind; | ||
| 3703 | if (event->kind == SELECTION_REQUEST_EVENT) | ||
| 3704 | { | ||
| 3705 | /* We must not use the ordinary copying code for this case, | ||
| 3706 | since `part' is an enum and copying it might not copy enough | ||
| 3707 | in this case. */ | ||
| 3708 | bcopy (event, (char *) sp, sizeof (*event)); | ||
| 3709 | } | ||
| 3710 | else | ||
| 3711 | 3702 | ||
| 3712 | { | 3703 | /* Put an input event back in the head of the event queue. */ |
| 3713 | sp->code = event->code; | ||
| 3714 | sp->part = event->part; | ||
| 3715 | sp->frame_or_window = event->frame_or_window; | ||
| 3716 | sp->arg = event->arg; | ||
| 3717 | sp->modifiers = event->modifiers; | ||
| 3718 | sp->x = event->x; | ||
| 3719 | sp->y = event->y; | ||
| 3720 | sp->timestamp = event->timestamp; | ||
| 3721 | } | ||
| 3722 | #else | ||
| 3723 | *kbd_store_ptr = *event; | ||
| 3724 | #endif | ||
| 3725 | 3704 | ||
| 3726 | ++kbd_store_ptr; | 3705 | void |
| 3706 | kbd_buffer_unget_event (event) | ||
| 3707 | register struct input_event *event; | ||
| 3708 | { | ||
| 3709 | if (kbd_fetch_ptr == kbd_buffer) | ||
| 3710 | kbd_fetch_ptr = kbd_buffer + KBD_BUFFER_SIZE; | ||
| 3711 | |||
| 3712 | /* Don't let the very last slot in the buffer become full, */ | ||
| 3713 | if (kbd_fetch_ptr - 1 != kbd_store_ptr) | ||
| 3714 | { | ||
| 3715 | --kbd_fetch_ptr; | ||
| 3716 | *kbd_fetch_ptr = *event; | ||
| 3727 | } | 3717 | } |
| 3728 | } | 3718 | } |
| 3729 | 3719 | ||
| @@ -3938,7 +3928,8 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 3938 | /* These two kinds of events get special handling | 3928 | /* These two kinds of events get special handling |
| 3939 | and don't actually appear to the command loop. | 3929 | and don't actually appear to the command loop. |
| 3940 | We return nil for them. */ | 3930 | We return nil for them. */ |
| 3941 | if (event->kind == SELECTION_REQUEST_EVENT) | 3931 | if (event->kind == SELECTION_REQUEST_EVENT |
| 3932 | || event->kind == SELECTION_CLEAR_EVENT) | ||
| 3942 | { | 3933 | { |
| 3943 | #ifdef HAVE_X11 | 3934 | #ifdef HAVE_X11 |
| 3944 | struct input_event copy; | 3935 | struct input_event copy; |
| @@ -3949,7 +3940,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 3949 | copy = *event; | 3940 | copy = *event; |
| 3950 | kbd_fetch_ptr = event + 1; | 3941 | kbd_fetch_ptr = event + 1; |
| 3951 | input_pending = readable_events (0); | 3942 | input_pending = readable_events (0); |
| 3952 | x_handle_selection_request (©); | 3943 | x_handle_selection_event (©); |
| 3953 | #else | 3944 | #else |
| 3954 | /* We're getting selection request events, but we don't have | 3945 | /* We're getting selection request events, but we don't have |
| 3955 | a window system. */ | 3946 | a window system. */ |
| @@ -3957,22 +3948,6 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 3957 | #endif | 3948 | #endif |
| 3958 | } | 3949 | } |
| 3959 | 3950 | ||
| 3960 | else if (event->kind == SELECTION_CLEAR_EVENT) | ||
| 3961 | { | ||
| 3962 | #ifdef HAVE_X11 | ||
| 3963 | struct input_event copy; | ||
| 3964 | |||
| 3965 | /* Remove it from the buffer before processing it. */ | ||
| 3966 | copy = *event; | ||
| 3967 | kbd_fetch_ptr = event + 1; | ||
| 3968 | input_pending = readable_events (0); | ||
| 3969 | x_handle_selection_clear (©); | ||
| 3970 | #else | ||
| 3971 | /* We're getting selection request events, but we don't have | ||
| 3972 | a window system. */ | ||
| 3973 | abort (); | ||
| 3974 | #endif | ||
| 3975 | } | ||
| 3976 | #if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS) | 3951 | #if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS) |
| 3977 | else if (event->kind == DELETE_WINDOW_EVENT) | 3952 | else if (event->kind == DELETE_WINDOW_EVENT) |
| 3978 | { | 3953 | { |
| @@ -4201,7 +4176,8 @@ swallow_events (do_display) | |||
| 4201 | 4176 | ||
| 4202 | /* These two kinds of events get special handling | 4177 | /* These two kinds of events get special handling |
| 4203 | and don't actually appear to the command loop. */ | 4178 | and don't actually appear to the command loop. */ |
| 4204 | if (event->kind == SELECTION_REQUEST_EVENT) | 4179 | if (event->kind == SELECTION_REQUEST_EVENT |
| 4180 | || event->kind == SELECTION_CLEAR_EVENT) | ||
| 4205 | { | 4181 | { |
| 4206 | #ifdef HAVE_X11 | 4182 | #ifdef HAVE_X11 |
| 4207 | struct input_event copy; | 4183 | struct input_event copy; |
| @@ -4212,25 +4188,7 @@ swallow_events (do_display) | |||
| 4212 | copy = *event; | 4188 | copy = *event; |
| 4213 | kbd_fetch_ptr = event + 1; | 4189 | kbd_fetch_ptr = event + 1; |
| 4214 | input_pending = readable_events (0); | 4190 | input_pending = readable_events (0); |
| 4215 | x_handle_selection_request (©); | 4191 | x_handle_selection_event (©); |
| 4216 | #else | ||
| 4217 | /* We're getting selection request events, but we don't have | ||
| 4218 | a window system. */ | ||
| 4219 | abort (); | ||
| 4220 | #endif | ||
| 4221 | } | ||
| 4222 | |||
| 4223 | else if (event->kind == SELECTION_CLEAR_EVENT) | ||
| 4224 | { | ||
| 4225 | #ifdef HAVE_X11 | ||
| 4226 | struct input_event copy; | ||
| 4227 | |||
| 4228 | /* Remove it from the buffer before processing it, */ | ||
| 4229 | copy = *event; | ||
| 4230 | |||
| 4231 | kbd_fetch_ptr = event + 1; | ||
| 4232 | input_pending = readable_events (0); | ||
| 4233 | x_handle_selection_clear (©); | ||
| 4234 | #else | 4192 | #else |
| 4235 | /* We're getting selection request events, but we don't have | 4193 | /* We're getting selection request events, but we don't have |
| 4236 | a window system. */ | 4194 | a window system. */ |
| @@ -11590,7 +11548,8 @@ mark_kboards () | |||
| 11590 | { | 11548 | { |
| 11591 | if (event == kbd_buffer + KBD_BUFFER_SIZE) | 11549 | if (event == kbd_buffer + KBD_BUFFER_SIZE) |
| 11592 | event = kbd_buffer; | 11550 | event = kbd_buffer; |
| 11593 | if (event->kind != SELECTION_REQUEST_EVENT) | 11551 | if (event->kind != SELECTION_REQUEST_EVENT |
| 11552 | && event->kind != SELECTION_CLEAR_EVENT) | ||
| 11594 | { | 11553 | { |
| 11595 | mark_object (event->x); | 11554 | mark_object (event->x); |
| 11596 | mark_object (event->y); | 11555 | mark_object (event->y); |