diff options
| author | Karoly Lorentey | 2007-01-01 17:38:32 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2007-01-01 17:38:32 +0000 |
| commit | 65e86587ab836aaa86b12ce30b219bcb4fcbaa06 (patch) | |
| tree | 7e13feee7387635f52df3613cf1bba4414781aab /src/macterm.c | |
| parent | 8c778e28bcf16b4baef6400a124ec2403941e940 (diff) | |
| parent | 1fc8c92b50100da709c94a0faa47deed5603634f (diff) | |
| download | emacs-65e86587ab836aaa86b12ce30b219bcb4fcbaa06.tar.gz emacs-65e86587ab836aaa86b12ce30b219bcb4fcbaa06.zip | |
Merged from emacs@sv.gnu.org.
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-536
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-537
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-538
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-539
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-540
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-541
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-542
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-543
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-544
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-545
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-546
Update from erc--emacs--22
* emacs@sv.gnu.org/emacs--devo--0--patch-547
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-548
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-549
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-550
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-551
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-552
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-553
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-554
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-555
erc-iswitchb: Temporarily enable iswitchb mode
* emacs@sv.gnu.org/emacs--devo--0--patch-556
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-557
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-558
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-559
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-560
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-561
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-562
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-563
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-564
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-565
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-566
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-567
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-568
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-569
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-570
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-571
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-572
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-573
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-574
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-575
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-576
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-577
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-578
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-579
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-580
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-581
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-582
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-583
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-584
Fix admin/quick-install-emacs to work with recent versions of autoconf
* emacs@sv.gnu.org/gnus--rel--5.10--patch-171
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-172
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-173
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-174
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-175
Update from CVS: lisp/legacy-gnus-agent.el: Add Copyright notice.
* emacs@sv.gnu.org/gnus--rel--5.10--patch-176
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-177
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-178
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-179
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-180
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-181
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-182
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-183
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-184
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-185
Merge from emacs--devo--0
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-590
Diffstat (limited to 'src/macterm.c')
| -rw-r--r-- | src/macterm.c | 226 |
1 files changed, 159 insertions, 67 deletions
diff --git a/src/macterm.c b/src/macterm.c index 4739a52520e..6eaf549ba85 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -1154,7 +1154,8 @@ mac_query_char_extents (style, c, | |||
| 1154 | UniChar ch = c; | 1154 | UniChar ch = c; |
| 1155 | 1155 | ||
| 1156 | err = atsu_get_text_layout_with_text_ptr (&ch, 1, style, &text_layout); | 1156 | err = atsu_get_text_layout_with_text_ptr (&ch, 1, style, &text_layout); |
| 1157 | if (err == noErr) | 1157 | if (err == noErr |
| 1158 | && (font_ascent_return || font_descent_return || overall_return)) | ||
| 1158 | { | 1159 | { |
| 1159 | ATSTrapezoid glyph_bounds; | 1160 | ATSTrapezoid glyph_bounds; |
| 1160 | 1161 | ||
| @@ -6987,7 +6988,6 @@ static Lisp_Object fm_font_family_alist; | |||
| 6987 | static Lisp_Object atsu_font_id_hash; | 6988 | static Lisp_Object atsu_font_id_hash; |
| 6988 | /* Alist linking Font Manager style to face attributes. */ | 6989 | /* Alist linking Font Manager style to face attributes. */ |
| 6989 | static Lisp_Object fm_style_face_attributes_alist; | 6990 | static Lisp_Object fm_style_face_attributes_alist; |
| 6990 | static Lisp_Object Vmac_atsu_font_table; | ||
| 6991 | extern Lisp_Object QCfamily, QCweight, QCslant, Qnormal, Qbold, Qitalic; | 6991 | extern Lisp_Object QCfamily, QCweight, QCslant, Qnormal, Qbold, Qitalic; |
| 6992 | #endif | 6992 | #endif |
| 6993 | 6993 | ||
| @@ -7224,6 +7224,73 @@ add_mac_font_name (name, size, style, charset) | |||
| 7224 | } | 7224 | } |
| 7225 | 7225 | ||
| 7226 | #if USE_ATSUI | 7226 | #if USE_ATSUI |
| 7227 | static FMFontStyle | ||
| 7228 | fm_get_style_from_font (font) | ||
| 7229 | FMFont font; | ||
| 7230 | { | ||
| 7231 | OSStatus err; | ||
| 7232 | FMFontStyle style = normal; | ||
| 7233 | ByteCount len; | ||
| 7234 | UInt16 mac_style; | ||
| 7235 | FMFontFamily font_family; | ||
| 7236 | #define FONT_HEADER_MAC_STYLE_OFFSET (4*4 + 2*2 + 8*2 + 2*4) | ||
| 7237 | |||
| 7238 | /* FMGetFontFamilyInstanceFromFont returns `normal' as the style of | ||
| 7239 | some font (e.g., Optima) even if it is `bold'. */ | ||
| 7240 | err = FMGetFontTable (font, 'head', FONT_HEADER_MAC_STYLE_OFFSET, | ||
| 7241 | sizeof (mac_style), &mac_style, &len); | ||
| 7242 | if (err == noErr | ||
| 7243 | && len >= FONT_HEADER_MAC_STYLE_OFFSET + sizeof (mac_style)) | ||
| 7244 | style = EndianU16_BtoN (mac_style); | ||
| 7245 | else | ||
| 7246 | FMGetFontFamilyInstanceFromFont (font, &font_family, &style); | ||
| 7247 | |||
| 7248 | return style; | ||
| 7249 | } | ||
| 7250 | |||
| 7251 | static ATSUFontID | ||
| 7252 | atsu_find_font_from_family_name (family) | ||
| 7253 | const char *family; | ||
| 7254 | { | ||
| 7255 | struct Lisp_Hash_Table *h = XHASH_TABLE (atsu_font_id_hash); | ||
| 7256 | unsigned hash_code; | ||
| 7257 | int i; | ||
| 7258 | Lisp_Object rest, best; | ||
| 7259 | FMFontStyle min_style, style; | ||
| 7260 | |||
| 7261 | i = hash_lookup (h, make_unibyte_string (family, strlen (family)), | ||
| 7262 | &hash_code); | ||
| 7263 | if (i < 0) | ||
| 7264 | return kATSUInvalidFontID; | ||
| 7265 | |||
| 7266 | rest = HASH_VALUE (h, i); | ||
| 7267 | if (INTEGERP (rest) || (CONSP (rest) && INTEGERP (XCDR (rest)))) | ||
| 7268 | return cons_to_long (rest); | ||
| 7269 | |||
| 7270 | rest = Fnreverse (rest); | ||
| 7271 | best = XCAR (rest); | ||
| 7272 | rest = XCDR (rest); | ||
| 7273 | if (!NILP (rest) | ||
| 7274 | && (min_style = fm_get_style_from_font (cons_to_long (best))) != normal) | ||
| 7275 | do | ||
| 7276 | { | ||
| 7277 | style = fm_get_style_from_font (cons_to_long (XCAR (rest))); | ||
| 7278 | if (style < min_style) | ||
| 7279 | { | ||
| 7280 | best = XCAR (rest); | ||
| 7281 | if (style == normal) | ||
| 7282 | break; | ||
| 7283 | else | ||
| 7284 | min_style = style; | ||
| 7285 | } | ||
| 7286 | rest = XCDR (rest); | ||
| 7287 | } | ||
| 7288 | while (!NILP (rest)); | ||
| 7289 | |||
| 7290 | HASH_VALUE (h, i) = best; | ||
| 7291 | return cons_to_long (best); | ||
| 7292 | } | ||
| 7293 | |||
| 7227 | static Lisp_Object | 7294 | static Lisp_Object |
| 7228 | fm_style_to_face_attributes (fm_style) | 7295 | fm_style_to_face_attributes (fm_style) |
| 7229 | FMFontStyle fm_style; | 7296 | FMFontStyle fm_style; |
| @@ -7244,6 +7311,44 @@ fm_style_to_face_attributes (fm_style) | |||
| 7244 | 7311 | ||
| 7245 | return tem; | 7312 | return tem; |
| 7246 | } | 7313 | } |
| 7314 | |||
| 7315 | static Lisp_Object | ||
| 7316 | atsu_find_font_family_name (font_id) | ||
| 7317 | ATSUFontID font_id; | ||
| 7318 | { | ||
| 7319 | OSStatus err; | ||
| 7320 | ByteCount len; | ||
| 7321 | Lisp_Object family = Qnil; | ||
| 7322 | |||
| 7323 | err = ATSUFindFontName (font_id, kFontFamilyName, | ||
| 7324 | kFontMacintoshPlatform, kFontNoScript, | ||
| 7325 | kFontNoLanguage, 0, NULL, &len, NULL); | ||
| 7326 | if (err == noErr) | ||
| 7327 | { | ||
| 7328 | family = make_uninit_string (len); | ||
| 7329 | err = ATSUFindFontName (font_id, kFontFamilyName, | ||
| 7330 | kFontMacintoshPlatform, kFontNoScript, | ||
| 7331 | kFontNoLanguage, len, SDATA (family), | ||
| 7332 | NULL, NULL); | ||
| 7333 | } | ||
| 7334 | if (err == noErr) | ||
| 7335 | decode_mac_font_name (SDATA (family), len + 1, Qnil); | ||
| 7336 | |||
| 7337 | return family; | ||
| 7338 | } | ||
| 7339 | |||
| 7340 | Lisp_Object | ||
| 7341 | mac_atsu_font_face_attributes (font_id) | ||
| 7342 | ATSUFontID font_id; | ||
| 7343 | { | ||
| 7344 | Lisp_Object family, style_attrs; | ||
| 7345 | |||
| 7346 | family = atsu_find_font_family_name (font_id); | ||
| 7347 | if (NILP (family)) | ||
| 7348 | return Qnil; | ||
| 7349 | style_attrs = fm_style_to_face_attributes (fm_get_style_from_font (font_id)); | ||
| 7350 | return Fcons (QCfamily, Fcons (family, style_attrs)); | ||
| 7351 | } | ||
| 7247 | #endif | 7352 | #endif |
| 7248 | 7353 | ||
| 7249 | /* Sets up the table font_name_table to contain the list of all fonts | 7354 | /* Sets up the table font_name_table to contain the list of all fonts |
| @@ -7275,9 +7380,8 @@ init_font_name_table () | |||
| 7275 | unsigned hash_code; | 7380 | unsigned hash_code; |
| 7276 | ItemCount nfonts, i; | 7381 | ItemCount nfonts, i; |
| 7277 | ATSUFontID *font_ids = NULL; | 7382 | ATSUFontID *font_ids = NULL; |
| 7278 | Ptr name; | 7383 | Lisp_Object prev_family = Qnil; |
| 7279 | ByteCount name_len; | 7384 | int j; |
| 7280 | Lisp_Object family; | ||
| 7281 | 7385 | ||
| 7282 | atsu_font_id_hash = | 7386 | atsu_font_id_hash = |
| 7283 | make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE), | 7387 | make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE), |
| @@ -7295,41 +7399,25 @@ init_font_name_table () | |||
| 7295 | if (err == noErr) | 7399 | if (err == noErr) |
| 7296 | for (i = 0; i < nfonts; i++) | 7400 | for (i = 0; i < nfonts; i++) |
| 7297 | { | 7401 | { |
| 7298 | err = ATSUFindFontName (font_ids[i], kFontFamilyName, | 7402 | Lisp_Object family; |
| 7299 | kFontMacintoshPlatform, kFontNoScript, | 7403 | |
| 7300 | kFontNoLanguage, 0, NULL, &name_len, NULL); | 7404 | family = atsu_find_font_family_name (font_ids[i]); |
| 7301 | if (err != noErr) | 7405 | if (NILP (family) || SREF (family, 0) == '.') |
| 7302 | continue; | 7406 | continue; |
| 7303 | name = xmalloc (name_len + 1); | 7407 | if (!NILP (Fequal (prev_family, family))) |
| 7304 | name[name_len] = '\0'; | 7408 | family = prev_family; |
| 7305 | err = ATSUFindFontName (font_ids[i], kFontFamilyName, | 7409 | else |
| 7306 | kFontMacintoshPlatform, kFontNoScript, | 7410 | j = hash_lookup (h, family, &hash_code); |
| 7307 | kFontNoLanguage, name_len, name, | 7411 | if (j < 0) |
| 7308 | NULL, NULL); | ||
| 7309 | if (err == noErr) | ||
| 7310 | { | 7412 | { |
| 7311 | FMFontFamily ff; | 7413 | add_mac_font_name (SDATA (family), 0, normal, "iso10646-1"); |
| 7312 | FMFontStyle style = normal; | 7414 | j = hash_put (h, family, Fcons (long_to_cons (font_ids[i]), |
| 7313 | 7415 | Qnil), hash_code); | |
| 7314 | decode_mac_font_name (name, name_len + 1, Qnil); | ||
| 7315 | family = make_unibyte_string (name, name_len); | ||
| 7316 | FMGetFontFamilyInstanceFromFont (font_ids[i], &ff, &style); | ||
| 7317 | Fputhash ((font_ids[i] > MOST_POSITIVE_FIXNUM | ||
| 7318 | ? make_float (font_ids[i]) | ||
| 7319 | : make_number (font_ids[i])), | ||
| 7320 | Fcons (QCfamily, | ||
| 7321 | Fcons (family, | ||
| 7322 | fm_style_to_face_attributes (style))), | ||
| 7323 | Vmac_atsu_font_table); | ||
| 7324 | if (*name != '.' | ||
| 7325 | && hash_lookup (h, family, &hash_code) < 0) | ||
| 7326 | { | ||
| 7327 | add_mac_font_name (name, 0, normal, "iso10646-1"); | ||
| 7328 | hash_put (h, family, long_to_cons (font_ids[i]), | ||
| 7329 | hash_code); | ||
| 7330 | } | ||
| 7331 | } | 7416 | } |
| 7332 | xfree (name); | 7417 | else if (EQ (prev_family, family)) |
| 7418 | HASH_VALUE (h, j) = Fcons (long_to_cons (font_ids[i]), | ||
| 7419 | HASH_VALUE (h, j)); | ||
| 7420 | prev_family = family; | ||
| 7333 | } | 7421 | } |
| 7334 | if (font_ids) | 7422 | if (font_ids) |
| 7335 | xfree (font_ids); | 7423 | xfree (font_ids); |
| @@ -7873,14 +7961,11 @@ mac_load_query_font (f, fontname) | |||
| 7873 | {kAllTypographicFeaturesType, kDiacriticsType}; | 7961 | {kAllTypographicFeaturesType, kDiacriticsType}; |
| 7874 | static const ATSUFontFeatureSelector selectors[] = | 7962 | static const ATSUFontFeatureSelector selectors[] = |
| 7875 | {kAllTypeFeaturesOffSelector, kDecomposeDiacriticsSelector}; | 7963 | {kAllTypeFeaturesOffSelector, kDecomposeDiacriticsSelector}; |
| 7876 | Lisp_Object font_id_cons; | ||
| 7877 | FMFontStyle style; | 7964 | FMFontStyle style; |
| 7878 | 7965 | ||
| 7879 | font_id_cons = Fgethash (make_unibyte_string (family, strlen (family)), | 7966 | font_id = atsu_find_font_from_family_name (family); |
| 7880 | atsu_font_id_hash, Qnil); | 7967 | if (font_id == kATSUInvalidFontID) |
| 7881 | if (NILP (font_id_cons)) | 7968 | return; |
| 7882 | return NULL; | ||
| 7883 | font_id = cons_to_long (font_id_cons); | ||
| 7884 | size_fixed = Long2Fix (size); | 7969 | size_fixed = Long2Fix (size); |
| 7885 | bold_p = (fontface & bold) != 0; | 7970 | bold_p = (fontface & bold) != 0; |
| 7886 | italic_p = (fontface & italic) != 0; | 7971 | italic_p = (fontface & italic) != 0; |
| @@ -8004,11 +8089,19 @@ mac_load_query_font (f, fontname) | |||
| 8004 | continue; | 8089 | continue; |
| 8005 | else if (c == 0x7f) | 8090 | else if (c == 0x7f) |
| 8006 | { | 8091 | { |
| 8007 | c = 0x9f; | 8092 | #if USE_CG_TEXT_DRAWING |
| 8008 | continue; | 8093 | if (font->cg_glyphs) |
| 8094 | { | ||
| 8095 | c = 0x9f; | ||
| 8096 | pcm = NULL; | ||
| 8097 | continue; | ||
| 8098 | } | ||
| 8099 | #endif | ||
| 8100 | break; | ||
| 8009 | } | 8101 | } |
| 8010 | 8102 | ||
| 8011 | mac_query_char_extents (font->mac_style, c, NULL, NULL, pcm + c, | 8103 | mac_query_char_extents (font->mac_style, c, NULL, NULL, |
| 8104 | pcm ? pcm + c : NULL, | ||
| 8012 | #if USE_CG_TEXT_DRAWING | 8105 | #if USE_CG_TEXT_DRAWING |
| 8013 | (font->cg_glyphs ? font->cg_glyphs + c | 8106 | (font->cg_glyphs ? font->cg_glyphs + c |
| 8014 | : NULL) | 8107 | : NULL) |
| @@ -8026,6 +8119,8 @@ mac_load_query_font (f, fontname) | |||
| 8026 | font->cg_font = NULL; | 8119 | font->cg_font = NULL; |
| 8027 | xfree (font->cg_glyphs); | 8120 | xfree (font->cg_glyphs); |
| 8028 | font->cg_glyphs = NULL; | 8121 | font->cg_glyphs = NULL; |
| 8122 | if (pcm == NULL) | ||
| 8123 | break; | ||
| 8029 | } | 8124 | } |
| 8030 | #endif | 8125 | #endif |
| 8031 | } | 8126 | } |
| @@ -8033,6 +8128,7 @@ mac_load_query_font (f, fontname) | |||
| 8033 | else | 8128 | else |
| 8034 | #endif | 8129 | #endif |
| 8035 | { | 8130 | { |
| 8131 | OSStatus err; | ||
| 8036 | FontInfo the_fontinfo; | 8132 | FontInfo the_fontinfo; |
| 8037 | int is_two_byte_font; | 8133 | int is_two_byte_font; |
| 8038 | 8134 | ||
| @@ -8115,8 +8211,13 @@ mac_load_query_font (f, fontname) | |||
| 8115 | sizeof (XCharStruct) * (0xff - 0x20 + 1)); | 8211 | sizeof (XCharStruct) * (0xff - 0x20 + 1)); |
| 8116 | 8212 | ||
| 8117 | space_bounds = font->bounds.per_char; | 8213 | space_bounds = font->bounds.per_char; |
| 8118 | mac_query_char_extents (NULL, 0x20, &font->ascent, &font->descent, | 8214 | err = mac_query_char_extents (NULL, 0x20, &font->ascent, |
| 8119 | space_bounds, NULL); | 8215 | &font->descent, space_bounds, NULL); |
| 8216 | if (err != noErr || space_bounds->width <= 0) | ||
| 8217 | { | ||
| 8218 | mac_unload_font (&one_mac_display_info, font); | ||
| 8219 | return NULL; | ||
| 8220 | } | ||
| 8120 | 8221 | ||
| 8121 | for (c = 0x21, pcm = space_bounds + 1; c <= 0xff; c++, pcm++) | 8222 | for (c = 0x21, pcm = space_bounds + 1; c <= 0xff; c++, pcm++) |
| 8122 | mac_query_char_extents (NULL, c, NULL, NULL, pcm, NULL); | 8223 | mac_query_char_extents (NULL, c, NULL, NULL, pcm, NULL); |
| @@ -9365,9 +9466,7 @@ mac_store_event_ref_as_apple_event (class, id, class_key, id_key, | |||
| 9365 | { | 9466 | { |
| 9366 | mac_store_apple_event (class_key, id_key, &apple_event); | 9467 | mac_store_apple_event (class_key, id_key, &apple_event); |
| 9367 | AEDisposeDesc (&apple_event); | 9468 | AEDisposeDesc (&apple_event); |
| 9368 | /* Post a harmless event so as to wake up from | 9469 | mac_wakeup_from_rne (); |
| 9369 | ReceiveNextEvent. */ | ||
| 9370 | mac_post_mouse_moved_event (); | ||
| 9371 | } | 9470 | } |
| 9372 | } | 9471 | } |
| 9373 | } | 9472 | } |
| @@ -10404,7 +10503,9 @@ XTread_socket (sd, expected, hold_quit) | |||
| 10404 | #else | 10503 | #else |
| 10405 | FrontWindow () | 10504 | FrontWindow () |
| 10406 | #endif | 10505 | #endif |
| 10407 | != window_ptr) | 10506 | != window_ptr |
| 10507 | || (mac_window_to_frame (window_ptr) | ||
| 10508 | != dpyinfo->x_focus_frame)) | ||
| 10408 | SelectWindow (window_ptr); | 10509 | SelectWindow (window_ptr); |
| 10409 | else | 10510 | else |
| 10410 | { | 10511 | { |
| @@ -11677,7 +11778,7 @@ syms_of_macterm () | |||
| 11677 | DEFVAR_BOOL ("x-use-underline-position-properties", | 11778 | DEFVAR_BOOL ("x-use-underline-position-properties", |
| 11678 | &x_use_underline_position_properties, | 11779 | &x_use_underline_position_properties, |
| 11679 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. | 11780 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. |
| 11680 | nil means ignore them. If you encounter fonts with bogus | 11781 | A value of nil means ignore them. If you encounter fonts with bogus |
| 11681 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior | 11782 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior |
| 11682 | to 4.1, set this to nil. | 11783 | to 4.1, set this to nil. |
| 11683 | 11784 | ||
| @@ -11687,9 +11788,9 @@ NOTE: Not supported on Mac yet. */); | |||
| 11687 | DEFVAR_BOOL ("x-underline-at-descent-line", | 11788 | DEFVAR_BOOL ("x-underline-at-descent-line", |
| 11688 | &x_underline_at_descent_line, | 11789 | &x_underline_at_descent_line, |
| 11689 | doc: /* *Non-nil means to draw the underline at the same place as the descent line. | 11790 | doc: /* *Non-nil means to draw the underline at the same place as the descent line. |
| 11690 | nil means to draw the underline according to the value of the variable | 11791 | A value of nil means to draw the underline according to the value of the |
| 11691 | `x-use-underline-position-properties', which is usually at the baseline | 11792 | variable `x-use-underline-position-properties', which is usually at the |
| 11692 | level. The default value is nil. */); | 11793 | baseline level. The default value is nil. */); |
| 11693 | x_underline_at_descent_line = 0; | 11794 | x_underline_at_descent_line = 0; |
| 11694 | 11795 | ||
| 11695 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, | 11796 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, |
| @@ -11736,8 +11837,8 @@ unexpected results for some keys on non-US/GB keyboards. */); | |||
| 11736 | &Vmac_emulate_three_button_mouse, | 11837 | &Vmac_emulate_three_button_mouse, |
| 11737 | doc: /* *Specify a way of three button mouse emulation. | 11838 | doc: /* *Specify a way of three button mouse emulation. |
| 11738 | The value can be nil, t, or the symbol `reverse'. | 11839 | The value can be nil, t, or the symbol `reverse'. |
| 11739 | nil means that no emulation should be done and the modifiers should be | 11840 | A value of nil means that no emulation should be done and the modifiers |
| 11740 | placed on the mouse-1 event. | 11841 | should be placed on the mouse-1 event. |
| 11741 | t means that when the option-key is held down while pressing the mouse | 11842 | t means that when the option-key is held down while pressing the mouse |
| 11742 | button, the click will register as mouse-2 and while the command-key | 11843 | button, the click will register as mouse-2 and while the command-key |
| 11743 | is held down, the click will register as mouse-3. | 11844 | is held down, the click will register as mouse-3. |
| @@ -11788,15 +11889,6 @@ CODING_SYSTEM is a coding system corresponding to TEXT-ENCODING. */); | |||
| 11788 | Fcons (list3 (build_string ("mac-roman"), | 11889 | Fcons (list3 (build_string ("mac-roman"), |
| 11789 | make_number (smRoman), Qnil), Qnil); | 11890 | make_number (smRoman), Qnil), Qnil); |
| 11790 | 11891 | ||
| 11791 | #if USE_ATSUI | ||
| 11792 | DEFVAR_LISP ("mac-atsu-font-table", &Vmac_atsu_font_table, | ||
| 11793 | doc: /* Hash table of ATSU font IDs vs plist of attributes and values. */); | ||
| 11794 | Vmac_atsu_font_table = | ||
| 11795 | make_hash_table (Qeql, make_number (DEFAULT_HASH_SIZE), | ||
| 11796 | make_float (DEFAULT_REHASH_SIZE), | ||
| 11797 | make_float (DEFAULT_REHASH_THRESHOLD), | ||
| 11798 | Qnil, Qnil, Qnil); | ||
| 11799 | #endif | ||
| 11800 | #if USE_MAC_TSM | 11892 | #if USE_MAC_TSM |
| 11801 | DEFVAR_LISP ("mac-ts-active-input-overlay", &Vmac_ts_active_input_overlay, | 11893 | DEFVAR_LISP ("mac-ts-active-input-overlay", &Vmac_ts_active_input_overlay, |
| 11802 | doc: /* Overlay used to display Mac TSM active input area. */); | 11894 | doc: /* Overlay used to display Mac TSM active input area. */); |