Fix global hook affecting non-WA processes by checking whether the WA window is active.