- if(!result)
- {
- XTranslateCoordinates(top_level->display,
- top_level->event_win,
- menu_popup->get_popup()->win,
- top_level->cursor_x,
- top_level->cursor_y,
- &cursor_x,
- &cursor_y,
- &tempwin);
-
- if(cursor_x >= 0 && cursor_x < menu_popup->get_w() &&
- cursor_y >= y && cursor_y < y + h)
- {
+ if( !result && menu_popup->cursor_inside() ) {
+ int cursor_x, cursor_y;
+ menu_popup->get_popup()->get_relative_cursor(cursor_x, cursor_y);
+ if( cursor_x >= 0 && cursor_x < menu_popup->get_w() &&
+ cursor_y >= y && cursor_y < y + h ) {