That looks correct.
I was confusing the event.area rectangle with the allocation rectangle.
For event.area x,y is relative to the widget and "x,y,x,y,w,h" works.
But self.allocation x,y is relative to the parent so you need
Send instant messages to your online friends http://au.messenger.yahoo.com
On Fri, 2005-08-05 at 20:28 -0700, firstname.lastname@example.org wrote:
>>>>> "John" == John Hunter <jdhunter@...5...>
> I think we have a problem in GTK. In the script
> you add a button or some other widget above the
> canvas, only a part of the canvas is updated in the
> motion_notify_event update. The distance from the
> the figure canvas to the part that is not updated is
> to the height of the widget packed above the canvas.
> can observe this by resizing the window to make it
> shorter and noting the vertical extent where the
> line disappears.
I think the answer is
# synchronous window redraw (like GTK+ 1.2 used to do)
# Note: this does not follow the usual way that GTK
# which is asynchronous redraw using calls to
# which triggers an expose-event
# GTK+ 2.x style draw()
#self._need_redraw = True
# synchronous draw (needed for animation)
x, y, w, h = self.allocation
#print x, y, w, h
self._pixmap_prepare (w, h)
self._render_figure(self._pixmap, w, h)
self._need_redraw = False
self._pixmap, 0, 0, 0, 0,