Mercurial > emacs
changeset 70561:083b25be83bd
(x_to_mac_color): Fix shift amount change.
[USE_MAC_FONT_PANEL] (mac_set_font): Use x_get_focus_frame.
[USE_MAC_FONT_PANEL] (Fmac_set_font_panel_visibility): Doc fix.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Wed, 10 May 2006 08:23:45 +0000 |
parents | de135c2adb2f |
children | e2bd086e6902 |
files | src/macfns.c |
diffstat | 1 files changed, 26 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/src/macfns.c Wed May 10 08:23:20 2006 +0000 +++ b/src/macfns.c Wed May 10 08:23:45 2006 +0000 @@ -1091,7 +1091,7 @@ char *color; unsigned long colorval; int i, pos; - pos = 0; + pos = 16; colorval = 0; color = colorname + 4; @@ -1127,7 +1127,7 @@ if (value == ULONG_MAX) break; colorval |= (value << pos); - pos += 0x8; + pos -= 0x8; if (i == 2) { if (*end != '\0') @@ -1146,7 +1146,7 @@ char *color; unsigned long colorval; int i, pos; - pos = 0; + pos = 16; colorval = 0; color = colorname + 5; @@ -1168,7 +1168,7 @@ if (val == 0x100) val = 0xFF; colorval |= (val << pos); - pos += 0x8; + pos -= 0x8; if (i == 2) { if (*end != '\0') @@ -1919,6 +1919,27 @@ x_set_scroll_bar_width (f, arg, oldval); } +static void +mac_set_font (f, arg, oldval) + struct frame *f; + Lisp_Object arg, oldval; +{ + x_set_font (f, arg, oldval); +#if USE_MAC_FONT_PANEL + { + Lisp_Object focus_frame = x_get_focus_frame (f); + + if ((NILP (focus_frame) && f == SELECTED_FRAME ()) + || XFRAME (focus_frame) == f) + { + BLOCK_INPUT; + mac_set_font_info_for_selection (f, DEFAULT_FACE_ID, 0); + UNBLOCK_INPUT; + } + } +#endif +} + #if TARGET_API_MAC_CARBON static void mac_update_proxy_icon (f) @@ -2013,22 +2034,6 @@ #endif } -static void -mac_set_font (f, arg, oldval) - struct frame *f; - Lisp_Object arg, oldval; -{ - x_set_font (f, arg, oldval); -#if USE_MAC_FONT_PANEL - if (FRAME_MAC_DISPLAY_INFO (f)->x_focus_frame == f) - { - BLOCK_INPUT; - mac_set_font_info_for_selection (f); - UNBLOCK_INPUT; - } -#endif -} - /* Subroutines of creating a frame. */ @@ -4503,7 +4508,7 @@ #if USE_MAC_FONT_PANEL DEFUN ("mac-set-font-panel-visibility", Fmac_set_font_panel_visibility, Smac_set_font_panel_visibility, 1, 1, 0, - doc: /* Set the font panel visibile if and only if VISIBLE is non-nil. + doc: /* Make the font panel visible if and only if VISIBLE is non-nil. This is for internal use only. Use `mac-font-panel-mode' instead. */) (visible) Lisp_Object visible;