handle framebuffer invalidation of windows with frames correctly