user32: Set the queue mask only after flushing the window surfaces.