Mercurial > emacs
diff src/macterm.c @ 46856:eba75fedd593
2002-08-10 Andrew Choi <akochoi@shaw.ca>
* mac.c (sys_select) [MAC_OSX]: New function.
* macterm.c (MakeMeTheFrontProcess): New function.
(mac_initialize): Call MakeMeTheFrontProcess.
* s/darwin.h: Define select to sys_select.
author | Andrew Choi <akochoi@shaw.ca> |
---|---|
date | Sun, 11 Aug 2002 00:26:24 +0000 |
parents | 0139d2dce230 |
children | 8b7ade57211d |
line wrap: on
line diff
--- a/src/macterm.c Sat Aug 10 03:48:12 2002 +0000 +++ b/src/macterm.c Sun Aug 11 00:26:24 2002 +0000 @@ -366,6 +366,7 @@ extern Lisp_Object x_icon_type P_ ((struct frame *)); +extern int inhibit_window_system; #if __MRC__ QDGlobals qd; /* QuickDraw global information structure. */ @@ -13405,6 +13406,18 @@ return dpyinfo; } +#ifdef MAC_OSX +void MakeMeTheFrontProcess () +{ + ProcessSerialNumber psn; + OSErr err; + + err = GetCurrentProcess (&psn); + if (err == noErr) + (void) SetFrontProcess (&psn); +} +#endif /* MAC_OSX */ + /* Set up use of X before we make the first connection. */ static struct redisplay_interface x_redisplay_interface = @@ -13514,6 +13527,9 @@ #endif DisableMenuCommand (NULL, kHICommandQuit); + + if (!inhibit_window_system) + MakeMeTheFrontProcess (); #endif }