rem: int scr_width = menu->frame->screen_ptr->scr_width; int scr_height = menu->frame->screen_ptr->scr_height;
add: WMRect rect = wGetRectForHead(menu->frame->screen_ptr, wGetHeadForPointerLocation(menu->frame->screen_ptr));
context: wMenuMapAt(WMenu *menu, int x, int y, int keyboard){    int scr_width = menu->frame->screen_ptr->scr_width;    int scr_height = menu->frame->screen_ptr->scr_height;    if (!menu->flags.realized) {        menu->flags.realized=1;        wMenuRealize(menu);    }    if (!menu->flags.mapped) {        if (wPreferences.wrap_menus) {            if (x<0) x = 0;            if (y<0) y = 0;            if (x+MENUW(menu) > scr_width)                x = scr_width - MENUW(menu);            if (y+MENUH(menu) > scr_height)                y = scr_height - MENUH(menu);        }        XMoveWindow(dpy, menu->frame->core->window, x, y);        menu->frame_x = x;        menu->frame_y = y;        XMapWindow(dpy, menu->frame->core->window);        wRaiseFrame(menu->frame->core);        menu->flags.mapped = 1;    } else {        selectEntry(menu, 0);    }    if (keyboard)        keyboardMenu(menu);}