Hi,

The changes to Wx that allow use with the standard Perl executable on Mac have caused me a few issues.

Using a syntax editor ( I use Komodo but I would guess Padre etc will have the same problems ) is now impossible as any process spawned to check syntax is brought to the front and given focus - taking it away from my editor.

A lesser problem is that you also cannot use your Mac for anything else whilst Wx tests are running (or tests for any module that loads Wx).

The attached patch moves the foregrounding code to a function and requires application code to do something like:

Wx::MacSetFrontProcess() if Wx::wxMAC();

The question is, is it just me that finds this an issue and would everybody else prefer SetFrontProcess to happen automatically as it does in Wx 0.98?

Regards


Mark


Index: Wx.xs
===================================================================
--- Wx.xs       (revision 2982)
+++ Wx.xs       (working copy)
@@ -252,11 +252,6 @@
 bool 
 Load( bool croak_on_error = false )
   CODE:
-#if defined(__WXMAC__)
-    ProcessSerialNumber kCurrentPSN = { 0, kCurrentProcess };
-    TransformProcessType( &kCurrentPSN, 
kProcessTransformToForegroundApplication );
-    SetFrontProcess( &kCurrentPSN );
-#endif
     wxPerlAppCreated = wxTheApp != NULL;
     if( wxPerlInitialized )
         XSRETURN( true );
@@ -327,7 +322,18 @@
     }
   OUTPUT: RETVAL
 
+#if defined(__WXMAC__)
+
 void
+MacSetFrontProcess()
+  CODE:
+    ProcessSerialNumber kCurrentPSN = { 0, kCurrentProcess };
+    TransformProcessType( &kCurrentPSN, 
kProcessTransformToForegroundApplication );
+    SetFrontProcess( &kCurrentPSN );
+
+#endif
+
+void
 SetConstants()
   CODE:
     // this is after wxEntryStart, since

Reply via email to