Subject: Re: Menu Styles

From: Dominik Vogt <[email-masked]>
Date: Thu, 18 Feb 1999 22:08:21 +0100

In-Reply-To: <[email-masked]>; from Tim Phipps on Thu, Feb 18, 1999 at 05:14:26PM +0000

On Thu, Feb 18, 1999 at 05:14:26PM +0000, Tim Phipps wrote:
> "Paul D. Smith" wrote:
> > 
> > You have to use the ChangeMenuStyle command to apply a MenuStyle to a
> > Menu.  Kind of confusing, since that's not needed with normal Style.
> 
> Another nice thing would be a UseMenuStyle so that one menustyle could
> use another as a basis.
> 
> I think I found a minor bug with menu animation when menustyles change
> from one to another or it may be that if you don't specify much in a
> menustyle it gets something wrong.  My menustyle defns:
> 
> Emulate MWM
> MenuStyle * Foreground Black, BackGround LightGrey, Greyed Grey,
> ActiveFore Navy
> MenuStyle * Hilight3DThick, Animation On, MenuFace TiledPixmap
> PT_003.xpm
> MenuStyle * PopupOffset -2 100, TitleWarp, TitleUnderlines1,
> SeparatorsShort
> MenuStyle * MenuFace DGradient 128 3 Magenta 33 Yellow 34 Cyan 33
> Magenta
> MenuStyle StartStyle SidePic 100/side.fvwm2.xpm, SideColor Black
> 
> The start menu is defined:
> 
> DestroyMenu StartMenu
> AddToMenu StartMenu
> + "&Host        %mini-term.xpm%"        Popup OnceMenu
> ...
> ChangeMenuStyle StartStyle StartMenu
> 
> It's popped up with
> 
> Menu StartMenu Root 0 o100-24p
> 
> The result is that the start menu pops up in the right place but the
> first submenu that prepops causes the start menu to be warped to the
> right before the first submenu is mapped on the left of the start menu. 
> What should happen is that the submenu should map half over the start
> menu since I don't define a PopupOffset in StartStyle.  I've attached a
> jpg of the result, ignore the colours, Exceed can't handle the server
> having its own colormap.  I had to turn the quality down to 10% to get
> it to 10K.

I can understand what happens. I have mixed up the menu styles here.
The PopupOffset is a property of the parent menu, not the popup menu.
What happens is this:

The PopupOffset of the parent menu is:

  0 66

and of the sub menu:

  -2 100

When the popup menu is mapped it uses the PopupOffset of the parent's
menu style and thus overlaps the start menu at 66%. This is correct
so far. But now the code checks if it has to animate the parent out of
the way. To do this it checks if the menus overlap more than the
PopupOffset and position hints suggest under normal circumstances. But
accidentally it seems to look at the popup's PopupOffset which is -2 100.
So it expects the menus to overlap with only two pixels (which is not
the case) and animates the parent away.

I'll create a patch for it, but I don't think it's worth fixing for
2.2.

Bye

Dominik

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]

--
Visit the official FVWM web page at <URL:http://fvwm.math.uh.edu/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].