Subject: comments on the recent ter-off menu patches

From: [email-masked]
Date: Tue, 1 Jul 2003 00:53:34 +0200

There are some parts of the patch I do not understand or that are
bugs.

1) In menu_tear_off():

	ms = menustyle_find(buffer);
	if (!ms)
	{
		/* this must never happen */
		fvwm_msg(
			ERR, "menu_tear_off",
			"impossible to create %s menu style", buffer);
		free(buffer);
		DestroyMenu(mr, False, False);
		return;
	}

Is there a specific reason why you use menustyle_find() instead of
"MR_STYLE(mr_to_copy) " which is much simpler and can not fail?
Even if there is a reason, I don't think you can return from the
function.

2) In clone_menu_root_static():

What is the logic of changing

	MR_COPIES(dest_mr) = 0;

to

	MR_COPIES(dest_mr) = 1;

?  Was it a bug?

3) This is a bug:

	do_menu_close_tear_off_menu(pmp->menu, *pmp);
	pmret->rc = MENU_ABORTED;
	discard_window_events(
		MR_WINDOW(pmp->menu), EnterWindowMask);

do_menu_close_tear_off_menu() destroys the MR_WINDOW(pmp->menu)
and thus discard_window_events() operates on a random Xid.

4) Please name all functions exported in menustyle.c
"menustyle_something()".  (I renamed copy_menu_style() to
menustyle_copy()).

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]