[SF#839]Fix menu positioning if it's placed near monitor edge.

If we just limit position just inside of monitor area then we may get
into issue when mouse cursor appears inside of menu so button release
will activate some item in the menu. This should be avoided.