Subject: MenuStyle

From: Olivier Chapuis <[email-masked]>
Date: Mon, 11 Dec 2000 23:28:21 +0100

Hello,

1.a. Some times ago, Dominik, you say that using MenuStyle command
with dynamic menus "almost guaranteed to crash fvwm". I try
such a thing with a modified version of fvwm-menu-desktop:

AddToMenu kde-sys DynamicPopupAction PipeRead 'fvwm-menu-desktop \
 	--desktop kde-sys ...'

this modified version add at the end of the menus somthing like that:

	print MenuStyle "kde" font "a_font"
	foreach $menu in (@kde_menu)
		ChangeMenuStyle "kde" $menu

This does not crash fvwm2 at all. 

b. Also I've modified fvwm-menu-directory and add somthing like:

	MenuStyle "directory" PopupDelayed, PopupDelay 10000
        ChangeMenuStyle "directory" nameOfthedirmenu

so that we can choose easly the sub dir we want to popup. This
does not crash fvwm2. But, the style is applied to all the menus.
The man page says that PopupDelayed and PopupDelay should be set
for the default menu style only, this seems very strange for me ...

So, using MenuStyle within dynamic menus really dangerous?

2. Why we do not have this famous command that dump the default
menu style to a new menu style? Is this really difficult to do?

Thanks, Olivier
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
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]

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 17 Dec 2000 07:22:11 +0100

> This does not crash fvwm2 at all. 

Hm, I tried for half an hour to crash fvwm, but I can't.  Seems
that I wrote some code to prevent this, but I don't remember
anything.

> for the default menu style only, this seems very strange for me ...

This is because the popup delay would be a property of the
*parent* menu, not the popup menu.  But to be honest I don't
understand why I did not make it a menu specific setting either.
Will be changed with my next commit.

> So, using MenuStyle within dynamic menus really dangerous?

Hm.  Anybody is welcome to try to crash this code.

> menu style to a new menu style? Is this really difficult to do?

No, it's not so difficult.  But it will require more than simply
doing a memcopy of the menu style.  All the allocated memory has
to be duplicated and the font, sidepic, menuface, colours etc.
have to be reloaded/reallocated also.  The patch that someone
sent a year ago or so did not take care of this.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
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]