Added gfx_invalidate_window

Added the gfx_invalidate_window function. I was going to leave this for someone else to implement but I couldn't think of anything to do tonight.