summaryrefslogtreecommitdiff
path: root/src/mactoolbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mactoolbox.c')
-rw-r--r--src/mactoolbox.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mactoolbox.c b/src/mactoolbox.c
index a73578d5205..c6e5f8bcf8a 100644
--- a/src/mactoolbox.c
+++ b/src/mactoolbox.c
@@ -573,7 +573,7 @@ mac_handle_text_input_event (next_handler, event, data)
int hpos, vpos, x, y;
struct glyph_row *row;
struct glyph *glyph;
- XFontStruct *font;
+ struct face *face;
f = mac_focus_frame (&one_mac_display_info);
w = XWINDOW (f->selected_window);
@@ -598,9 +598,10 @@ mac_handle_text_input_event (next_handler, event, data)
+ row->visible_height
+ f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f));
- font = FACE_FROM_ID (f, glyph->face_id)->font;
- if (font)
+ face = FACE_FROM_ID (f, glyph->face_id);
+ if (face && face->font)
{
+ XFontStruct *font = face->font;
Fixed point_size = Long2Fix (font->mac_fontsize);
short height = row->visible_height;
short ascent = row->ascent;