[PATCH 1/2] server: Track foreground process id, instead of looking for active window.