[vtk-developers] Missing [window close] in vtkCocoaRenderWindow

David Gobbi david.gobbi at gmail.com
Thu Feb 25 12:03:50 EST 2010


I'll commit the change, then... probably tomorrow morning.

Just a note to everyone else on the reasoning behind this change: this
will make the window automatically close when the vtkCocoaWindow
destructs, even if there is no interactor.  Right now an
interactor-less cocoa window won't close until the application exits.
(I still haven't looked deeply enough into the
CocaRenderWindowInteractor code to properly understand exactly when it
will close the window).

   David


On Thu, Feb 25, 2010 at 9:29 AM, Sean McBride <sean at rogue-research.com> wrote:
> On 2/19/10 2:16 PM, David Gobbi said:
>
>>I wonder if there is any harm in calling "close" multiple times?  I've
>>added a [window close] to DestroyWindow and so far everything seems to
>>be peachy keen
>
> I've added:
>
>  if (this->WindowCreated)
>    {
>    NSWindow* win = (NSWindow*)this->GetRootWindow();
>    [win close];
>    this->WindowCreated = 0;
>    }
>
> near the end of DestroyWindow, just before:
>
>  this->SetWindowId(NULL);
>  this->SetParentId(NULL);
>  this->SetRootWindow(NULL);
>
> and this change doesn't seem to cause me any problems.
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
>



More information about the vtk-developers mailing list