Do not call validate_visible_area() from the draw method
Because validate_visible_area() can modify the window size (and thus the underlying surface), it should not be called from within the draw method. Given that the presize handler is run with a higher priority than redraw, and the presize handler will validate the visible area, there should not be cases wherein the draw method is called and validate_visible_area() has not been run yet. However, one such a case was gdk_window_process_updates(), which would trigger the draw method at some point. We now work around this by factoring this in a new gtk_tree_view_bin_process_updates() function that will run the presize handler first if needed. Note: for other platforms, it might still be the case that the draw method is called and validate_visible_area() has not been run yet. (For example the Mac backend calls gdk_window_process_updates() from the drawRect method, and the redraw-in-idle handling thus works differently). This does not seem to be a problem now, if it will be in the future we need to take care of that then.
Please register or sign in to comment