On Fri, Jul 05, 2002 at 09:14:54PM +0000, Mikhael Goikhman wrote: > On 05 Jul 2002 15:08:48 +0200, Dominik Vogt wrote: > > > > On Thu, Jul 04, 2002 at 05:16:04PM +0000, Mikhael Goikhman wrote: > > > On 04 Jul 2002 08:23:11 -0500, FVWM CVS wrote: > > > > > > > > Log message: > > > > * Another menus-from-modules-window-selection fix. New behaviour: > > > > Menus use > > > > the context window unless they are invoked from a module. To force a > > > > menu with > > > > a context window from a module, you have to use the "Schedule" command. > > > > > > What was exactly a problem so changing the existing behaviour is needed? > > > > > > This breaks application menus in FvwmIconMan, FvwmTaskBar etc. > > > > - FvwmButtons invokes a menu > > - Menu invokes FvwmIdent > > > > ==> FvwmButtons was automatically selected as FvwmIdent's target. > > > > I'm not sure what broke it. Perhaps the change should be made in > > module_interface.c, not in the menu code. > > When I read this strange description (FvwmButtons unlike FvwmIconMan and > FvwmTaskBar does not set a window context) I immediately thought about > some global variable used instead of a window context passed by a module. > Good you don't use it anymore, seems like a correct fix.
Yes, it was some confusion between several globals. Recently I removed the "Context" global - and that triggered it. The problem: There are (were) two pairs of vars that describe the context: the parameters "fw" and "context" and the globals "Fw" and "Context". Usually, I belive, not always, the [Cc]ontext bit overrides the [Ff]w bit. In other words: if context is C_ROOT and fw is a valid window, the window is ignored. The menu code had a place (menu_func()) where Fw was taken as a fallback when fw == NULL. Somehow the Fw was used as the context window, although context must have been C_ROOT. I'd immediately throw out the last dangerous global (Fw), but I don't understand well enough how it works. If I do something wrong, we'll likely get a number of core dumps. Sigh, this is all so confusing. You always regret when you use globals just to save the effort of passing the context data around. > Although I can't test it right now; you say it dumps core anyway. That's fixed now. > Now when menus respect a window context (I think it's good), we need a way > to throw it out. "Any" would be ok, but it requires at least one window. > Should we add a new prefix-like unconditional command "NoContext"? I don't know. Is it really necessary? I'm swamped in old bug reports right now, so I'd be grateful if you can take care of it. Bye Dominik ^_^ ^_^ -- Dominik Vogt, [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] -- 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 PROTECTED] To report problems, send mail to [EMAIL PROTECTED]