On Sunday, May 18, 2014, Christophe <christophe.cu...@free.fr> wrote:
> Signed-off-by: Christophe CURIS <christophe.cu...@free.fr <javascript:;>> > > Not pointed by Coverity either. (that's a funny one) > > Yes quite funny .. So the good thing when using multiple tools is that we were able to find more issues ! > ----- David Maciejak <david.macie...@gmail.com <javascript:;>> a écrit : > > did some change as prepare_menu_position never updated x and y values > > > > --- > > src/winmenu.c | 14 +++++++------- > > 1 file changed, 7 insertions(+), 7 deletions(-) > > > > diff --git a/src/winmenu.c b/src/winmenu.c > > index 5fa4886..d8b3f4f 100644 > > --- a/src/winmenu.c > > +++ b/src/winmenu.c > > @@ -729,16 +729,16 @@ static WMenu *open_window_menu_core(WWindow *wwin) > > return menu; > > } > > > > -static void prepare_menu_position(WMenu *menu, int x, int y) > > +static void prepare_menu_position(WMenu *menu, int *x, int *y) > > { > > WMRect rect; > > > > rect = wGetRectForHead(menu->frame->screen_ptr, > > wGetHeadForPointerLocation(menu->frame->screen_ptr)); > > - if (x < rect.pos.x - menu->frame->core->width / 2) > > - x = rect.pos.x - menu->frame->core->width / 2; > > - if (y < rect.pos.y) > > - y = rect.pos.y; > > + if (*x < rect.pos.x - menu->frame->core->width / 2) > > + *x = rect.pos.x - menu->frame->core->width / 2; > > + if (*y < rect.pos.y) > > + *y = rect.pos.y; > > } > > > > void OpenWindowMenu(WWindow *wwin, int x, int y, int keyboard) > > @@ -757,7 +757,7 @@ void OpenWindowMenu(WWindow *wwin, int x, int y, > > int keyboard) > > x = wwin->frame_x; > > > > /* Common menu position */ > > - prepare_menu_position(menu, x, y); > > + prepare_menu_position(menu, &x, &y); > > > > if (!wwin->flags.internal_window) > > wMenuMapAt(menu, x, y, keyboard); > > @@ -781,7 +781,7 @@ void OpenWindowMenu2(WWindow *wwin, int x, int y, > > int keyboard) > > x -= menu->frame->core->width / 2; > > > > /* Common menu position */ > > - prepare_menu_position(menu, x, y); > > + prepare_menu_position(menu, &x, &y); > > > > if (!wwin->flags.internal_window) > > wMenuMapAt(menu, x, y, keyboard); > > -- > > 1.8.3.2 > > > -- > To unsubscribe, send mail to > wmaker-dev-unsubscr...@lists.windowmaker.org<javascript:;> > . >