diff options
author | Karoly Lorentey <karoly@lorentey.hu> | 2007-02-24 19:26:54 +0000 |
---|---|---|
committer | Karoly Lorentey <karoly@lorentey.hu> | 2007-02-24 19:26:54 +0000 |
commit | f65f7603312547e51230192daf34349b8ac569a0 (patch) | |
tree | cbc5877854d00bbdd5ecd4906d130ab8fbb44430 /src/macfns.c | |
parent | 9440b75fccbf763e3fb23a31a128d97eb4debdf5 (diff) | |
parent | 735895f1fa28f88c559e73910ea0ff0bda0f228c (diff) | |
download | emacs-f65f7603312547e51230192daf34349b8ac569a0.tar.gz |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-619
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-620
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-621
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-622
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-623
Remove RCS keywords
* emacs@sv.gnu.org/emacs--devo--0--patch-624
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-625
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-626
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-627
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-628
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-629
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-630
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-631
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-632
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-633
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-634
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-635
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-636
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-637
Remove RCS keywords
* emacs@sv.gnu.org/emacs--devo--0--patch-638
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-639
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-640
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-641
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-642
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-643
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-644
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-645
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-646
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-647
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-648
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-649
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-197
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-198
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-199
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-200
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-201
Update from CVS: lisp/nnweb.el (nnweb-google-parse-1): Update parser.
* emacs@sv.gnu.org/gnus--rel--5.10--patch-202
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-596
Diffstat (limited to 'src/macfns.c')
-rw-r--r-- | src/macfns.c | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/src/macfns.c b/src/macfns.c index c43a43dae62..9be0d0e9ea5 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -2863,9 +2863,31 @@ FRAME nil means use the selected frame. */) (frame) Lisp_Object frame; { + OSErr err; + ProcessSerialNumber front_psn; + static const ProcessSerialNumber current_psn = {0, kCurrentProcess}; + Boolean front_p; struct frame *f = check_x_frame (frame); BLOCK_INPUT; + /* Move the current process to the foreground if it is not. Don't + call SetFrontProcess if the current process is already running in + the foreground so as not to change the z-order of windows. */ + err = GetFrontProcess (&front_psn); + if (err == noErr) + err = SameProcess (&front_psn, ¤t_psn, &front_p); + if (err == noErr) + if (!front_p) + { +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 + if (FrontNonFloatingWindow () == FRAME_MAC_WINDOW (f)) + SetFrontProcessWithOptions (¤t_psn, + kSetFrontProcessFrontWindowOnly); + else +#endif + SetFrontProcess (¤t_psn); + } + #ifdef MAC_OSX ActivateWindow (ActiveNonFloatingWindow (), false); ActivateWindow (FRAME_MAC_WINDOW (f), true); @@ -4513,7 +4535,7 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) filename[len++] = '/'; CFStringGetCString(reply.saveFileName, filename+len, sizeof (filename) - len, -#if MAC_OSX +#ifdef MAC_OSX kCFStringEncodingUTF8 #else CFStringGetSystemEncoding () @@ -4575,22 +4597,22 @@ DEFUN ("mac-clear-font-name-table", Fmac_clear_font_name_table, } #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: /* Make the font panel visible if and only if VISIBLE is non-nil. +DEFUN ("mac-set-font-panel-visible-p", Fmac_set_font_panel_visible_p, + Smac_set_font_panel_visible_p, 1, 1, 0, + doc: /* Make the font panel visible if and only if FLAG is non-nil. This is for internal use only. Use `mac-font-panel-mode' instead. */) - (visible) - Lisp_Object visible; + (flag) + Lisp_Object flag; { OSStatus err = noErr; check_mac (); BLOCK_INPUT; - if (NILP (visible) != !mac_font_panel_visible_p ()) + if (NILP (flag) != !mac_font_panel_visible_p ()) { err = mac_show_hide_font_panel (); - if (err == noErr && !NILP (visible)) + if (err == noErr && !NILP (flag)) { Lisp_Object focus_frame = x_get_focus_frame (SELECTED_FRAME ()); struct frame *f = (NILP (focus_frame) ? SELECTED_FRAME () @@ -4860,7 +4882,7 @@ Chinese, Japanese, and Korean. */); #endif defsubr (&Smac_clear_font_name_table); #if USE_MAC_FONT_PANEL - defsubr (&Smac_set_font_panel_visibility); + defsubr (&Smac_set_font_panel_visible_p); #endif #if USE_ATSUI defsubr (&Smac_atsu_font_face_attributes); |