This is a minor fix so to let submenus appear adjacent to the
triangle.

------ M. Meiarashi
    -- [EMAIL PROTECTED]

--- menus.c-0.93.14     Wed Oct 24 21:06:44 2001
+++ menus.c     Sat Oct 27 20:01:47 2001
@@ -340,8 +340,7 @@
     if (ActiveItem)
     {
        /* create a new sub-menu */
-       if ((ActiveItem->func == F_POPUP) &&
-           (x > (3 * ActiveMenu->width >> 2)))
+       if (ActiveItem->func == F_POPUP)
        {
 
            PrevPrevMenu = PrevMenu;
@@ -1116,7 +1115,7 @@
     MenuRoot *PrevActiveMenu = 0;
     MenuItem *PrevActiveItem = 0;
     int retval = MENU_NOP;
-    int x, y;
+    int x, y, d;
 
     /* this condition could get ugly */
     if (menu->in_use)
@@ -1135,14 +1134,16 @@
     {
        prevStashedX = Stashed_X;
        prevStashedY = Stashed_Y;
-
        PrevActiveMenu = ActiveMenu;
        PrevActiveItem = ActiveItem;
+       /* this d is from paint_entry() */
+       d = (scr->components[MWM_MENU].f_height + HEIGHT_EXTRA - 7) / 2;
        if (ActiveMenu)
-           x = Stashed_X + (ActiveMenu->width >> 1) + (menu->width >> 1) - 3;
+           x = Stashed_X + (ActiveMenu->width ) -d ;
+       
        if (ActiveItem)
            y = ActiveItem->y_offset + MenuY +
-               ((scr->components[MWM_MENU].f_height + HEIGHT_EXTRA) >> 1);
+               ((scr->components[MWM_MENU].f_height + HEIGHT_EXTRA) >> 2);
     }
     else
     {

Reply via email to