<br>I've tried this change to vtkCocoaRenderWindow.mm and it seems to be working when I build Cone6 without the MACOSX_BUNDLE option for cmake.<br><br>#include <vtksys/ios/sstream><br>#include <CoreServices/CoreServices.h><br>
.<br>.<br>.<br>//----------------------------------------------------------------------------<br>void vtkCocoaRenderWindow::MakeCurrent()<br>{<br>Â if (this->GetContextId())<br>Â Â Â {<br>Â Â Â [(NSOpenGLContext*)this->GetContextId() makeCurrentContext];<br>
   }<br><br><br> // **** BEGIN EDIT<br> // Adding process control so the window gets keyboard events.<br> ProcessSerialNumber psn = { 0, kCurrentProcess };<br> TransformProcessType( &psn, kProcessTransformToForegroundApplication );<br>
 // **** END EDIT<br>
<br><br>}<br><br><br><br>I wonder if the 'psn' variable should be put into an init method instead?  If so, I guess there should be a method to get it too.<br><br>Best, Darren<br><br><br><br><br><div class="gmail_quote">
On Thu, Mar 19, 2009 at 4:03 PM, Sean McBride <span dir="ltr"><<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On 3/19/09 3:58 PM, Darren Weber said:<br>
<br>
>I'm not yet versed in Cocoa to make the change required. Â I can follow<br>
>specific instructions... Â I wonder if the keyboard event capture should<br>
>apply at the level of the window or at the level of the interactor?<br>
<br>
</div>The snippit you had was good (wrong header though), so just paste it<br>
into the vtkCocoaRenderWindowInteractor constructor:<br>
<br>
#include <ApplicationServices/ApplicationServices.h><br>
<br>
ProcessSerialNumber psn = { 0, kCurrentProcess };<br>
OSStatus error = TransformProcessType( &psn,<br>
kProcessTransformToForegroundApplication );<br>
assert (error == noErr);<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">____________________________________________________________<br>
Sean McBride, B. Eng         <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
Rogue Research             <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
Mac Software Developer        Montréal, Québec, Canada<br>
<br>
<br>
</div></div></blockquote></div><br>