[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/keyboard.c
From: |
Kim F . Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/keyboard.c |
Date: |
Fri, 05 Nov 2004 06:38:58 -0500 |
Index: emacs/src/keyboard.c
diff -c emacs/src/keyboard.c:1.792 emacs/src/keyboard.c:1.793
*** emacs/src/keyboard.c:1.792 Sat Oct 9 23:24:49 2004
--- emacs/src/keyboard.c Fri Nov 5 11:30:01 2004
***************
*** 3698,3733 ****
Discard the event if it would fill the last slot. */
if (kbd_fetch_ptr - 1 != kbd_store_ptr)
{
- #if 0 /* The SELECTION_REQUEST_EVENT case looks bogus, and it's error
- prone to assign individual members for other events, in case
- the input_event structure is changed. --2000-07-13, gerd. */
- struct input_event *sp = kbd_store_ptr;
- sp->kind = event->kind;
- if (event->kind == SELECTION_REQUEST_EVENT)
- {
- /* We must not use the ordinary copying code for this case,
- since `part' is an enum and copying it might not copy enough
- in this case. */
- bcopy (event, (char *) sp, sizeof (*event));
- }
- else
! {
! sp->code = event->code;
! sp->part = event->part;
! sp->frame_or_window = event->frame_or_window;
! sp->arg = event->arg;
! sp->modifiers = event->modifiers;
! sp->x = event->x;
! sp->y = event->y;
! sp->timestamp = event->timestamp;
! }
! #else
! *kbd_store_ptr = *event;
! #endif
! ++kbd_store_ptr;
}
}
--- 3698,3723 ----
Discard the event if it would fill the last slot. */
if (kbd_fetch_ptr - 1 != kbd_store_ptr)
{
+ *kbd_store_ptr = *event;
+ ++kbd_store_ptr;
+ }
+ }
! /* Put an input event back in the head of the event queue. */
! void
! kbd_buffer_unget_event (event)
! register struct input_event *event;
! {
! if (kbd_fetch_ptr == kbd_buffer)
! kbd_fetch_ptr = kbd_buffer + KBD_BUFFER_SIZE;
!
! /* Don't let the very last slot in the buffer become full, */
! if (kbd_fetch_ptr - 1 != kbd_store_ptr)
! {
! --kbd_fetch_ptr;
! *kbd_fetch_ptr = *event;
}
}
***************
*** 3942,3948 ****
/* These two kinds of events get special handling
and don't actually appear to the command loop.
We return nil for them. */
! if (event->kind == SELECTION_REQUEST_EVENT)
{
#ifdef HAVE_X11
struct input_event copy;
--- 3932,3939 ----
/* These two kinds of events get special handling
and don't actually appear to the command loop.
We return nil for them. */
! if (event->kind == SELECTION_REQUEST_EVENT
! || event->kind == SELECTION_CLEAR_EVENT)
{
#ifdef HAVE_X11
struct input_event copy;
***************
*** 3953,3959 ****
copy = *event;
kbd_fetch_ptr = event + 1;
input_pending = readable_events (0);
! x_handle_selection_request (©);
#else
/* We're getting selection request events, but we don't have
a window system. */
--- 3944,3950 ----
copy = *event;
kbd_fetch_ptr = event + 1;
input_pending = readable_events (0);
! x_handle_selection_event (©);
#else
/* We're getting selection request events, but we don't have
a window system. */
***************
*** 3961,3982 ****
#endif
}
- else if (event->kind == SELECTION_CLEAR_EVENT)
- {
- #ifdef HAVE_X11
- struct input_event copy;
-
- /* Remove it from the buffer before processing it. */
- copy = *event;
- kbd_fetch_ptr = event + 1;
- input_pending = readable_events (0);
- x_handle_selection_clear (©);
- #else
- /* We're getting selection request events, but we don't have
- a window system. */
- abort ();
- #endif
- }
#if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS)
else if (event->kind == DELETE_WINDOW_EVENT)
{
--- 3952,3957 ----
***************
*** 4201,4207 ****
/* These two kinds of events get special handling
and don't actually appear to the command loop. */
! if (event->kind == SELECTION_REQUEST_EVENT)
{
#ifdef HAVE_X11
struct input_event copy;
--- 4176,4183 ----
/* These two kinds of events get special handling
and don't actually appear to the command loop. */
! if (event->kind == SELECTION_REQUEST_EVENT
! || event->kind == SELECTION_CLEAR_EVENT)
{
#ifdef HAVE_X11
struct input_event copy;
***************
*** 4212,4236 ****
copy = *event;
kbd_fetch_ptr = event + 1;
input_pending = readable_events (0);
! x_handle_selection_request (©);
! #else
! /* We're getting selection request events, but we don't have
! a window system. */
! abort ();
! #endif
! }
!
! else if (event->kind == SELECTION_CLEAR_EVENT)
! {
! #ifdef HAVE_X11
! struct input_event copy;
!
! /* Remove it from the buffer before processing it, */
! copy = *event;
!
! kbd_fetch_ptr = event + 1;
! input_pending = readable_events (0);
! x_handle_selection_clear (©);
#else
/* We're getting selection request events, but we don't have
a window system. */
--- 4188,4194 ----
copy = *event;
kbd_fetch_ptr = event + 1;
input_pending = readable_events (0);
! x_handle_selection_event (©);
#else
/* We're getting selection request events, but we don't have
a window system. */
***************
*** 11456,11462 ****
{
if (event == kbd_buffer + KBD_BUFFER_SIZE)
event = kbd_buffer;
! if (event->kind != SELECTION_REQUEST_EVENT)
{
mark_object (event->x);
mark_object (event->y);
--- 11414,11421 ----
{
if (event == kbd_buffer + KBD_BUFFER_SIZE)
event = kbd_buffer;
! if (event->kind != SELECTION_REQUEST_EVENT
! && event->kind != SELECTION_CLEAR_EVENT)
{
mark_object (event->x);
mark_object (event->y);
- [Emacs-diffs] Changes to emacs/src/keyboard.c,
Kim F . Storm <=
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Richard M . Stallman, 2004/11/06
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Richard M . Stallman, 2004/11/08
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Kim F . Storm, 2004/11/09
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Kim F . Storm, 2004/11/15
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Stefan Monnier, 2004/11/25
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Steven Tamm, 2004/11/30