Added in 1.9.4
$leftwincid
Returns the window id of the last window where the mouse was left.
Example
menu @test { leave:/echo mouse left $leftwin $leftwinwid $leftwincid }