add screen mode restoration for each document