aboutsummaryrefslogtreecommitdiffstats
path: root/src/macfns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/macfns.c')
-rw-r--r--src/macfns.c46
1 files changed, 26 insertions, 20 deletions
diff --git a/src/macfns.c b/src/macfns.c
index 8e0d5153034..1c774f8ade2 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -1592,7 +1592,7 @@ x_set_icon_name (f, arg, oldval)
1592 if (STRINGP (oldval) && EQ (Fstring_equal (oldval, arg), Qt)) 1592 if (STRINGP (oldval) && EQ (Fstring_equal (oldval, arg), Qt))
1593 return; 1593 return;
1594 } 1594 }
1595 else if (!STRINGP (oldval) && EQ (oldval, Qnil) == EQ (arg, Qnil)) 1595 else if (!NILP (arg) || NILP (oldval))
1596 return; 1596 return;
1597 1597
1598 f->icon_name = arg; 1598 f->icon_name = arg;
@@ -2829,26 +2829,22 @@ FRAME nil means use the selected frame. */)
2829 Lisp_Object frame; 2829 Lisp_Object frame;
2830{ 2830{
2831 struct frame *f = check_x_frame (frame); 2831 struct frame *f = check_x_frame (frame);
2832 struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f);
2833 2832
2834 if (dpyinfo->x_focus_frame != f) 2833 BLOCK_INPUT;
2835 {
2836 BLOCK_INPUT;
2837#ifdef MAC_OSX 2834#ifdef MAC_OSX
2838 ActivateWindow (ActiveNonFloatingWindow (), false); 2835 ActivateWindow (ActiveNonFloatingWindow (), false);
2839 ActivateWindow (FRAME_MAC_WINDOW (f), true); 2836 ActivateWindow (FRAME_MAC_WINDOW (f), true);
2840#else 2837#else
2841#if !TARGET_API_MAC_CARBON 2838#if !TARGET_API_MAC_CARBON
2842 /* SelectWindow (Non-Carbon) does not issue deactivate events if 2839 /* SelectWindow (Non-Carbon) does not issue deactivate events if the
2843 the possibly inactive window that is to be selected is 2840 possibly inactive window that is to be selected is already the
2844 already the frontmost one. */ 2841 frontmost one. */
2845 SendBehind (FRAME_MAC_WINDOW (f), NULL); 2842 SendBehind (FRAME_MAC_WINDOW (f), NULL);
2846#endif 2843#endif
2847 /* This brings the window to the front. */ 2844 /* This brings the window to the front. */
2848 SelectWindow (FRAME_MAC_WINDOW (f)); 2845 SelectWindow (FRAME_MAC_WINDOW (f));
2849#endif 2846#endif
2850 UNBLOCK_INPUT; 2847 UNBLOCK_INPUT;
2851 }
2852 2848
2853 return Qnil; 2849 return Qnil;
2854} 2850}
@@ -3028,11 +3024,11 @@ If omitted or nil, that stands for the selected frame's display. */)
3028 { 3024 {
3029 if (response >= 0x00001040) 3025 if (response >= 0x00001040)
3030 { 3026 {
3031 err = Gestalt ('sys1', &major); /* gestaltSystemVersionMajor */ 3027 err = Gestalt (gestaltSystemVersionMajor, &major);
3032 if (err == noErr) 3028 if (err == noErr)
3033 err = Gestalt ('sys2', &minor); /* gestaltSystemVersionMinor */ 3029 err = Gestalt (gestaltSystemVersionMinor, &minor);
3034 if (err == noErr) 3030 if (err == noErr)
3035 err = Gestalt ('sys3', &bugfix); /* gestaltSystemVersionBugFix */ 3031 err = Gestalt (gestaltSystemVersionBugFix, &bugfix);
3036 } 3032 }
3037 else 3033 else
3038 { 3034 {
@@ -4518,8 +4514,18 @@ This is for internal use only. Use `mac-font-panel-mode' instead. */)
4518 check_mac (); 4514 check_mac ();
4519 4515
4520 BLOCK_INPUT; 4516 BLOCK_INPUT;
4521 if (NILP (visible) == (FPIsFontPanelVisible () == true)) 4517 if (NILP (visible) != !mac_font_panel_visible_p ())
4522 err = FPShowHideFontPanel (); 4518 {
4519 err = mac_show_hide_font_panel ();
4520 if (err == noErr && !NILP (visible))
4521 {
4522 Lisp_Object focus_frame = x_get_focus_frame (SELECTED_FRAME ());
4523 struct frame *f = (NILP (focus_frame) ? SELECTED_FRAME ()
4524 : XFRAME (focus_frame));
4525
4526 mac_set_font_info_for_selection (f, DEFAULT_FACE_ID, 0);
4527 }
4528 }
4523 UNBLOCK_INPUT; 4529 UNBLOCK_INPUT;
4524 4530
4525 if (err != noErr) 4531 if (err != noErr)