emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Carbon: Option-as-Meta Sometimes Inputs Accented Characters


From: YAMAMOTO Mitsuharu
Subject: Re: Carbon: Option-as-Meta Sometimes Inputs Accented Characters
Date: Mon, 14 May 2007 17:27:12 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shij┼Ź) APEL/10.6 Emacs/22.0.99 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Mon, 14 May 2007 04:08:54 -0400, Richard Stallman <address@hidden> 
>>>>> said:

>     OK, fine. I presume that patch isn't going to make it into the
> 22 branch?

> Could you show me the patch?  Is it in Mac-only code?

Here's a revised one, in Mac-only code.

                                     YAMAMOTO Mitsuharu
                                address@hidden

Index: src/macterm.c
===================================================================
RCS file: /sources/emacs/emacs/src/macterm.c,v
retrieving revision 1.214
diff -c -p -r1.214 macterm.c
*** src/macterm.c       13 Apr 2007 08:14:03 -0000      1.214
--- src/macterm.c       14 May 2007 08:21:23 -0000
*************** mac_get_mouse_btn (EventRef ref)
*** 9164,9178 ****
  
  /* 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
     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);
  
    if (result)
      return result;
--- 9164,9179 ----
  
  /* 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 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;
*************** static Boolean mac_convert_event_ref (Ev
*** 9201,9206 ****
--- 9202,9215 ----
        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;
*************** static Boolean mac_convert_event_ref (Ev
*** 9214,9220 ****
                                       NULL, &key_code);
            if (err == noErr)
              {
!               eventRec->what = keyDown;
                eventRec->message = char_codes | ((key_code & 0xff) << 8);
                result = 1;
              }
--- 9223,9229 ----
                                       NULL, &key_code);
            if (err == noErr)
              {
!               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]