Subject: CVS domivogt: * Another menus-from-modules-window-selection fix. New behaviour: Menus use

From: FVWM CVS <[email-masked]>
Date: Thu, 04 Jul 2002 08:23:11 -0500

CVSROOT:	/home/cvs/fvwm
Module name:	fvwm
Changes by:	domivogt	02/07/04 08:23:11

Modified files:
	.              : ChangeLog 
	fvwm           : menucmd.c module_interface.c 
	modules/FvwmButtons: FvwmButtons.c 

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.

--
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: Mikhael Goikhman <[email-masked]>
Date: Thu, 4 Jul 2002 17:16:04 +0000

> 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.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 5 Jul 2002 15:08:48 +0200

> 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.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [email-masked], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
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: Fri, 5 Jul 2002 15:40:30 +0200

> This breaks application menus in FvwmIconMan, FvwmTaskBar etc.

Fixed?

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Fri, 5 Jul 2002 21:14:54 +0000

> 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. Although I can't
test it right now; you say it dumps core anyway.

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"?

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 6 Jul 2002 23:50:09 +0200

On Fri, Jul 05, 2002 at 09:14:54PM +0000, Mikhael Goikhman wrote:
> 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.

> 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-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]