Added in 1.9.4

$lactivecid

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

See also $activecid, $active, $lactive, $activewid, $lactivewid. on ACTIVE.

Example

on *:ACTIVE:*:echo current active cid is $activecid last active cid was $lactivecid