add some support for handling redraw events