Added in 1.9.4

$lactivecid

Returns the connection id of the last active window before active window.