Re: Strange behavior when using GtkDrawingArea with backing pixmap ina GtkScrolledWindow



I have some problems about the usage of GtkDrawingArea with backing
pixmap when I use it in a GtkScrolledWindow.

<snip>

When I start the program and hit a keystoke, the DrawingArea will be
filled with red. This is OK.

However, when I try to resize the window by using the mouse, X window
seems not to update the drawing area with its backing pixmap.

I'm not sure, but I would guess that this is because you've got the
DrawingArea inside a ScrolledWindow.  The DrawingArea doesn't need to be
told about the resize because however large it is compared to the actual
window, the ScrolledWindow will handle the resize and just show a sub-area
in the actual window.

For example, if you reduce the size of your window, your DrawingArea will
stay at the original larger size but you'll just see less of it until you
scroll around to see the rest.

Try catching the resize event higher up your widget hierarchy and then
manually causing a reconfigure or redraw on the DrawingArea.

Richard.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]