emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/macterm.c,v [EMACS_22_BASE]


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] Changes to emacs/src/macterm.c,v [EMACS_22_BASE]
Date: Wed, 16 May 2007 08:15:32 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     YAMAMOTO Mitsuharu <mituharu>   07/05/16 08:15:32

Index: macterm.c
===================================================================
RCS file: /sources/emacs/emacs/src/macterm.c,v
retrieving revision 1.214
retrieving revision 1.214.2.1
diff -u -b -r1.214 -r1.214.2.1
--- macterm.c   13 Apr 2007 08:14:03 -0000      1.214
+++ macterm.c   16 May 2007 08:15:32 -0000      1.214.2.1
@@ -9164,15 +9164,16 @@
 
 /* Normally, ConvertEventRefToEventRecord will correctly handle all
    events.  However the click of the mouse wheel is not converted to a
-   mouseDown or mouseUp event.  Likewise for dead key down events.
-   This calls ConvertEventRef, but then checks to see if it is a mouse
-   up/down, or a dead key down carbon event that has not been
+   mouseDown or mouseUp event.  Likewise for dead key events.  This
+   calls ConvertEventRefToEventRecord, but then checks to see if it is
+   a mouse up/down, or a dead key Carbon event that has not been
    converted, and if so, converts it by hand (to be picked up in the
    XTread_socket loop).  */
 static Boolean mac_convert_event_ref (EventRef eventRef, EventRecord *eventRec)
 {
   OSStatus err;
   Boolean result = ConvertEventRefToEventRecord (eventRef, eventRec);
+  EventKind action;
 
   if (result)
     return result;
@@ -9201,6 +9202,14 @@
       switch (GetEventKind (eventRef))
        {
        case kEventRawKeyDown:
+         action = keyDown;
+         goto keystroke_common;
+       case kEventRawKeyRepeat:
+         action = autoKey;
+         goto keystroke_common;
+       case kEventRawKeyUp:
+         action = keyUp;
+       keystroke_common:
          {
            unsigned char char_codes;
            UInt32 key_code;
@@ -9214,7 +9223,7 @@
                                       NULL, &key_code);
            if (err == noErr)
              {
-               eventRec->what = keyDown;
+               eventRec->what = action;
                eventRec->message = char_codes | ((key_code & 0xff) << 8);
                result = 1;
              }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]