Subject: Window context for a menu

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 29 Jun 2002 11:21:52 +0000

Currently it seems impossible to invoke an arbitrary menu in a window
context. I.e. the following does not work as expected:

  Next (MyWindow) Menu WindowOperations

The only way to set a window context is using a module protocol, like:

  SendToModule FvwmPerl eval $module->send("Menu WindowOperations", 0x3e0000e)

Is there a reason for this?

Also, what does is_menu_from_frame_or_window_or_titlebar mean?
It is set to False 6 times and to True one time, but not used.

Regards,
Mikhael.
--
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: Sat, 29 Jun 2002 23:50:26 +0200

> Is there a reason for this?

No, I don't think this was intended.  It was caused by one of
these evil global variables.  Although every command gets the
window context passed in via the "context" variable, there was
still a global named "Context".  It was basically a write only
variable that was used in the menu_func() by accident (instead of
using the correct value from "context").  I have cleaned up this
mess and removed that global.  Please double check if the context
from modules still works.

> It is set to False 6 times and to True one time, but not used.

Looks like some unfinished work to get a window context for tear
off menus.  I have removed it since I don't understand it anymore.

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]

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 30 Jun 2002 01:17:30 +0000

On 29 Jun 2002 23:50:26 +0200, Dominik Vogt wrote:
> I have cleaned up this mess and removed that global.  Please double
> check if the context from modules still works.

It does not seem to work differently, i.e. "Next (MyWindow) Menu ...".

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 30 Jun 2002 04:13:36 +0200

> It does not seem to work differently, i.e. "Next (MyWindow) Menu ...".

Well, perhaps we should talk about what should happen first.  I'm
not sure what you expect.  That the menu is placed near the
window?  If so, adjacent to which part of the window and with
which gravity?

Other than that, there was another buggy global (ButtonWindow)
that was used in the menu code although Fw should have been used
instead.  I've removed all references to this global.  It might be
possible that a menu is now attached to a button or title bar
although is wasn't invoked in a window context.  I didn't quite
understand the logic behing this global, but it seemed buggy and
useless.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 30 Jun 2002 09:34:57 +0000

> window?  If so, adjacent to which part of the window and with

I don't expect menu position to be other than the pointer.
If I would want this, I would add "Interior 0 0" or "Window c o100".

> understand the logic behing this global, but it seemed buggy and

Now it works as expected, thanks.

Just the description in the menu hints should be updated from
"focused window/title/icon/button" to "frame/title/icon/button of the
context window".

Regards,
Mikhael.