Commit ae16bffe authored by Ken Martin's avatar Ken Martin
Browse files

added OwnWindow ivar and destructor

parent dead23b3
......@@ -55,6 +55,12 @@ vtkImageXViewer::vtkImageXViewer()
//----------------------------------------------------------------------------
vtkImageXViewer::~vtkImageXViewer()
{
// then close the old window
if (this->OwnWindow && this->DisplayId && this->WindowId)
{
XDestroyWindow(this->DisplayId,this->WindowId);
}
XSync(this->DisplayId,0);
}
......@@ -568,7 +574,7 @@ Window vtkImageXViewer::MakeDefaultWindow(int width, int height)
XMapWindow(this->DisplayId, window);
XSync(this->DisplayId,0);
this->OwnWindow = 1;
return window;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment