<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have found the bug that generates the following
warning when the window isn't immediately visible</FONT></DIV>
<DIV><FONT face=Arial size=2> (test.py:4677): Gdk-WARNING **:
gdkdrawable-x11.c:1012 drawable is not a pixmap or window</FONT></DIV>
<DIV><FONT face=Arial size=2>This message is visible for RedHat 7.3, RedHat 9.0
and Fedora.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What is the solution :</FONT></DIV>
<DIV><FONT face=Arial size=2> - When we call the method GetHandle() for an
invisible wxWindow, we obtain the precedent message.</FONT></DIV>
<DIV><FONT face=Arial size=2> Thus, the goal is to report the call
when the window will be visible => in the OnPaint method.</FONT></DIV>
<DIV><FONT face=Arial size=2> So, we remove the call to GetHandle()
in the constructor of the wxVTKRenderWindow.</FONT></DIV>
<DIV><FONT face=Arial size=2> - The OnPaint method calls Render() that
searchs if the current handle is good before rendering.</FONT></DIV>
<DIV><FONT face=Arial size=2> So, in the Render() method, we must
test if the window can have an handle. </FONT><FONT face=Arial size=2><FONT
face=Arial size=2>We can call the method GetHandle() in the 2 following cases
:</FONT></DIV>
<DIV> + If the method is called from the </FONT><FONT face=Arial
size=2>OnPaint, the wx method GetUpdateRegion() will returns a not empty region.
So, we will have an handle.</FONT></DIV>
<DIV><FONT face=Arial size=2> + If the method is called by the
user, the wx method GetUpdateRegion() will returns an empty region. But if
the window is visible, we</FONT></DIV>
<DIV><FONT face=Arial size=2> already have a
handle (variable self.__handle != None)</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT face=Arial size=2>File joined : </FONT></DIV>
<DIV><FONT face=Arial size=2> - diff between the old and the new
wxVTKRenderWindow (after thes modifications)</FONT></DIV>
<DIV><FONT face=Arial size=2> - a python test file showing the first step
(in my solution).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Cheers</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>-----------------------------------------------------------------<BR>Benoit
Regrain<BR>Ingénieur d'études CNRS (Creatis)<BR>email : <A
href="mailto:regrain@creatis.insa-lyon.fr">regrain@creatis.insa-lyon.fr</A><BR>phone
: (+33) (0) 4.72.43.82.58<BR>fax : (+33) (0) 4.72.43.85.26<BR>INSA - Bâtiment
Blaise Pascal<BR>7, avenue Jean Capelle<BR>F - 69621 Villeurbanne
Cedex<BR>-----------------------------------------------------------------<BR></FONT></DIV></BODY></HTML>