[vtkusers] [VTK + wxPython + Linux] bug : Reparent with widgetcontaining wxVTKRenderWindow
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Thu Feb 13 01:32:51 EST 2003
Hi Benoit,
>>>>> "BR" == Benoit Regrain <benoit.regrain at creatis.insa-lyon.fr> writes:
[PR on cross-platform issues]
BR> Concerning the method SetNextWindowId, it exists for Win32,
BR> WinCE and X platforms. The SetNextWindowInfo will only make
BR> the same work than SetNextWindowId, as SetWindowInfo makes the
BR> same work than SetWindowId. The variable modified by this
BR> method (variable this->NextWindowId) is afterused by
BR> WindowRemap, only. Under Windows, it works perfectly without
BR> that mecanism. But under linux, we must use it to supprim
BR> errors. Concerning Mac Carbon platform, the WindowRemap
BR> exists, but generates an error... (I don't have Mac
BR> environement to test it) Therefore, add the SetWindowInfo in
BR> vtkRenderWindow class will not add problems. I think it can
BR> be made for the 4.2 release.
Thanks for the clarifications. So it works under Linux and Win*. I
can only look at this stuff this weekend. I'll check with the
developers to see if I can check the changes in after testing it. If
its OK with them I'll commit them but in the case that the VTK 4.2
release is a little too close for comfort this will have to wait till
VTK 4.2 is released. Sorry about that but since VTK has to run on so
many platforms we have to be certain that nothing bad happens before a
release.
BR> To combine with these little modifications, wxVTKRenderWindow
BR> must be modified : - variable self.__Created is replaced by
BR> self.__Handle wich is the Handle id of current window used. -
BR> test in Render method to verify the handle used by VTK. It is
BR> made her because a reparent on an ancestor of vtkRenderWindow
BR> will change Handle id I remenber you a change that I had made
BR> before concerning the default size of vtkRenderWindow at
BR> creation of vwVTKRenderWindow...
I'll look at these this weekend provided it is felt that these changes
can make it into 4.2.
BR> After some tests, I have found an other error which is : -
BR> when I reparent a wx widget wich have more than one
BR> vtkRenderWindow inside, I obtain a segmentation fault under
BR> linux (windows didn't have problems). - the segmentation
BR> fault appears always in the same case depending of position
BR> and order of displays (in the window). To solve that (and I
BR> don't know if it's the best method because I'm a beginner in
BR> XLib), I'm closing the display when the drawing context is
BR> destroyed.
Hmm, there was a thread on this list on wxPython having trouble when
we destroyed windows containing render windows (this was also a *nix
only problem). I don't think we got around it properly. I'll check
if your patch fixes this as well.
Thanks for your efforts. I can't promise that this will make it into
4.2 but I'll try and look at it this weekend. If it does not make it
into 4.2 then the post 4.2 cvs will have this stuff checked in. Then
we'd have adequate time to thrash things out before the next release.
cheers,
prabhu
More information about the vtkusers
mailing list