[vtkusers] RenderWindow question...

Tuhin tk.sinha at vanderbilt.edu
Thu Feb 27 16:29:34 EST 2003


> How do you delete this window?

The user deletes it, by clicking on the window decoration close button.  The 
only way (that I know) to catch this is to have the window manager send you 
an event (i.e. WM_DESTROY_WINDOW).  If VTK catches this event, then that's 
great.... however, on my inspection of the code i can't find where this 
callback is setup.  Also, I'm not using XOpenGLRenderWindow directly, but I 
think that's where the code and the problem should be.

Tuhin

On Thursday 27 February 2003 15:14, Charl P. Botha wrote:
> On Thu, Feb 27, 2003 at 02:06:00PM -0600, Tuhin wrote:
> >   I'm having a vtkXOpenGLRenderWindow problem.  It seems that when a user
> > deletes the window the link between the window and VTK isn't cut.
> > Specifically, vtkXOpenGLRenderWindow::Mapped is not reset and
> > vtkXOpenGLRenderWindow::WindowId is not set to 0x0.  Thus, when a
> > Render() call is made to the window (after the user has deleted the
> > window) I get a SIGPIPE.  I have done a little X programming in the past
> > and have used WM events (i.e. WM_DELETE_WINDOW) to tell me when my window
> > was being destroyed. I looked through the VTK nightly source and I
> > couldn't find any classes that used WM_DELETE_WINDOW or the call
> > 'XSetWMProtocols' function that one uses to set WM event notifications.
>
> How do you delete this window?  This should be done with the Delete()
> method and DEFINITELY not C++ delete.  If you use the latter, you WILL run
> into problems.
>
> Also, you shouldn't use vtkXOpenGLRenderWindow directly.

-- 
Graduate Research Assistant
Dept. Of BME
Vanderbilt University
615-343-8261



More information about the vtkusers mailing list