save xterm/X11 mouse capturing state