Package: gtk

Function gtk-widget-set-redraw-on-allocate

Lambda List

gtk-widget-set-redraw-on-allocate (widget redraw)

Arguments

widget -- a gtk-widget object
redraw -- if true, the entire widget will be redrawn when it is allocated to a new size, otherwise, only the new portion of the widget will be redrawn

Details

Sets whether the entire widget is queued for drawing when its size allocation changes. By default, this setting is true and the entire widget is redrawn on every size change. If your widget leaves the upper left unchanged when made bigger, turning this setting off will improve performance.

Note that for widgets where the gtk-widget-has-window function is false setting this flag to false turns off all allocation on resizing: the widget will not even redraw if its position changes. This is to allow containers that do not draw anything to avoid excess invalidations. If you set this flag on a widget with no window that does draw on the GDK window, you are responsible for invalidating both the old and new allocation of the widget when the widget is moved and responsible for invalidating regions newly when the widget increases size.
 

See also

2021-9-19