1) If you hold a mouse button (left click, rclick, mouse wheel) while exiting a @window with your mouse, the leave event triggers repeatedly until you release the button, which is not expected.
The correct behavior is to trigger once just like when no mouse button is held.

Code
menu @test {
leave:echo -sg leave is triggering
}
/window -dp @test

2) The leave event has some leeway before triggering, it is possible for the mouse pointer to be out the window by a few pixels without the event triggering, this becomes an issue because the uclick event won't trigger at that point. Here is a situation:
When you click on an object in a picture window, you make that object draggable with sclick and then mouse event, a chess piece for example. When you release the sclick (uclick), you want to stop dragging. In this dragging context, if you leave the window with your mouse, typically, the result is ugly. If you're using $mouse.x $mouse.y inside an alias called outside of a menu {} event, $mouse.x and $mouse.y will still be filled and the result won't be correct, you typically want to stop dragging when the leave event trigger, so you do that.
Now at position x = 0, sclick and uclick trigger, at position x = -1, they don't, but the leave does not trigger either, so if you drag up to x = -1, your uclick event won't trigger and the leave event won't trigger either, but you released the click (and you have no way to know you exited the window with the mouse), now you're in a state where you're no longer holding the left click, but the object is still being dragged because uclick event never triggered. There's no workaround to this, I'm not sure if it's a bug but it would make a lot of sense for the leave event to trigger as soon as sclick etc can't anymore.

3) The mouse event stops triggering if you press alt in an window which has an editbox (/window -e) while holding a mouse button (pressing alt does not trigger the system menu in this case, maybe that's the bug..)


Code
 /window -BCoepfd +tn @test -1 -1 200 200
menu @test {
leave:echo -sg leave is triggering
mouse:echo -sg mouse is triggering
sclick:echo -sg sclick is triggering
uclick:echo -sg uclick is triggering
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel