changeset 71064:30ac4bc8f8f7

[USE_MAC_FONT_PANEL] (Fmac_set_font_panel_visibility): Call mac_set_font_info_for_selection if font panel is made visible.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Mon, 29 May 2006 09:42:41 +0000
parents 7510757f449b
children 380e4a856f30
files src/macfns.c
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/macfns.c	Mon May 29 08:06:15 2006 +0000
+++ b/src/macfns.c	Mon May 29 09:42:41 2006 +0000
@@ -4514,8 +4514,18 @@
   check_mac ();
 
   BLOCK_INPUT;
-  if (NILP (visible) == (FPIsFontPanelVisible () == true))
-    err = FPShowHideFontPanel ();
+  if (NILP (visible) != !mac_font_panel_visible_p ())
+    {
+      err = mac_show_hide_font_panel ();
+      if (err == noErr && !NILP (visible))
+	{
+	  Lisp_Object focus_frame = x_get_focus_frame (SELECTED_FRAME ());
+	  struct frame *f = (NILP (focus_frame) ? SELECTED_FRAME ()
+			     : XFRAME (focus_frame));
+
+	  mac_set_font_info_for_selection (f, DEFAULT_FACE_ID, 0);
+	}
+    }
   UNBLOCK_INPUT;
 
   if (err != noErr)