EventRef event;
void *data;
{
- OSStatus result, err = noErr;
+ OSStatus err, result;
Lisp_Object id_key = Qnil;
int num_params;
const EventParamName *names;
SetEventParameter (event, EVENT_PARAM_TEXT_INPUT_SEQUENCE_NUMBER,
typeUInt32, sizeof (UInt32), &seqno_uaia);
seqno_uaia++;
+ result = noErr;
break;
case kEventTextInputUnicodeForKeyEvent:
if (err == noErr && mac_mapped_modifiers (modifiers))
/* There're mapped modifier keys. Process it in
do_keystroke. */
- return eventNotHandledErr;
+ break;
if (err == noErr)
err = GetEventParameter (kbd_event, kEventParamKeyUnicodes,
typeUnicodeText, NULL, 0, &actual_size,
XSETFRAME (read_socket_inev->frame_or_window, f);
}
}
- return eventNotHandledErr;
+ break;
}
}
+ if (err == noErr)
+ {
+ /* Non-ASCII keystrokes without mapped modifiers are
+ processed at the Lisp level. */
+ id_key = Qunicode_for_key_event;
+ num_params = sizeof (names_ufke) / sizeof (names_ufke[0]);
+ names = names_ufke;
+ types = types_ufke;
+ result = noErr;
+ }
}
- /* Non-ASCII keystrokes without mapped modifiers are processed
- at the Lisp level. */
- id_key = Qunicode_for_key_event;
- num_params = sizeof (names_ufke) / sizeof (names_ufke[0]);
- names = names_ufke;
- types = types_ufke;
break;
case kEventTextInputOffsetToPos:
Point p;
if (!OVERLAYP (Vmac_ts_active_input_overlay))
- return eventNotHandledErr;
+ break;
/* Strictly speaking, this is not always correct because
previous events may change some states about display. */
- if (NILP (Foverlay_get (Vmac_ts_active_input_overlay, Qbefore_string)))
+ if (!NILP (Foverlay_get (Vmac_ts_active_input_overlay, Qbefore_string)))
+ {
+ /* Active input area is displayed around the current point. */
+ f = SELECTED_FRAME ();
+ w = XWINDOW (f->selected_window);
+ }
+ else if (WINDOWP (echo_area_window))
{
/* Active input area is displayed in the echo area. */
w = XWINDOW (echo_area_window);
f = WINDOW_XFRAME (w);
}
else
- {
- /* Active input area is displayed around the current point. */
- f = SELECTED_FRAME ();
- w = XWINDOW (f->selected_window);
- }
+ break;
p.h = (WINDOW_TO_FRAME_PIXEL_X (w, w->cursor.x)
+ WINDOW_LEFT_FRINGE_WIDTH (w)
+ f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f));
err = SetEventParameter (event, kEventParamTextInputReplyPoint,
typeQDPoint, sizeof (typeQDPoint), &p);
+ if (err == noErr)
+ result = noErr;
}
break;
err = mac_store_event_ref_as_apple_event (0, 0, Qtext_input, id_key,
event, num_params,
names, types);
- if (err == noErr)
- result = noErr;
-
return result;
}
#endif