bugfix: menu goes to the wrong position

fix the bug that menu will go to the wrong position if the
given coordinates are not integer.

Change-Id: Ic028b5f29ac25b60f7cfb8233e803b1ca5fe3b98