In Listing 6.3, the first thing that you did was make a copy of the mouse position. This mouse position is a relative position window area. It must be converted to an absolute position on the entire screen area for displaying the pop-up menu. If you don't convent the position coordinates, you can't predict where your pop-up menu will appear.