Added in 1.9.3

$lactivewid

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

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

Example

on *:ACTIVE:*:echo -ag active wid is $activewid last active wid was $lactivewid