I wonder if we should bury the process transformation magic somewhere in sal e.g. integrating it into the SAL_MAIN macro maybe accompanied by SetFrontProcess because TransformProcess alone doesn't bring an application to the front (which bites you when you start OOo from within a terminal).

Just my two cents,
Tino

eric b wrote:

Sorry,

Stupid Anti Viruses filtering simple patches :-/

Hope the copy paste is not filtered too :-)


--- svmainhook.cxx    2007-02-02 15:06:35.000000000 +0100
+++ svmainhook_new.cxx    2007-02-02 14:40:17.000000000 +0100
@@ -81,6 +81,12 @@
      EventLoopTimerRef aMainRunLoopTimerRef;
(void) InstallEventLoopTimer( GetCurrentEventLoop(), 0, 0, NewEventLoopTimerUPP( MainRunLoopForThreadedApps ), NULL, &aMainRunLoopTimerRef );

+    fprintf( stderr , " I'm here, just before to run TPT \n" );
+    ProcessSerialNumber psn;
+    GetCurrentProcess(&psn);
+ TransformProcessType(&psn, kProcessTransformToForegroundApplication);
+
+    fprintf( stderr , " TPT done \n" );
// We really only call RunApplicationEventLoop() to install the default CarbonEvent handlers. Once the timer installed above // fires, we remain in the MainRunLoopForThreadedApps() routine which is designed to yield to other cooperative threads.
      RunApplicationEventLoop();



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to