Subject: Window id of decoration frame

From: Scott Smedley <[email-masked]>
Date: Wed, 15 Oct 2003 20:01:57 +1000

Hi Mikhael,

This question is for you, but others might know the answer too.

How can I get the window Id of the decoration frame added by FVWM?
(via Perl/Tk or X11::Protocol)

To elaborate:
FVWM adds a decoration frame to each toplevel window. I want to know
the window Id of this decoration frame so I can detect 'EnterWindow'
events (to fix a focusing race condition in FvwmTabs).

After reading the Tk::Wm man page I thought $toplevel->wrapper()
would do what I want, but I just get a '0' value.

Any help/pointers muchly appreciated.

SCoTT. :)
--
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: Scott Smedley <[email-masked]>
Date: Wed, 15 Oct 2003 20:31:44 +1000

Hi Mikhael,

> events (to fix a focusing race condition in FvwmTabs).

It appears to be the great-grandparent of the toplevel window.
I was able to get it with a trio of XQueryTree() calls, but I'm not
sure how portable this is?

SCoTT. :)

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 15 Oct 2003 14:07:38 +0300

> sure how portable this is?

Take a look at:

  fvwm-perllib --man FVWM::Module::Tk

In the SYNOPSIS example I use $top->wrapper->[0].

I don't know what Tk does, it is very possible that it reparents their
widgets sometimes. I just don't know. I hope GTK+ is more consistent
(you may see its synopsys for the same example too).

Regards,
Mikhael.

---

From: Scott Smedley <[email-masked]>
Date: Sat, 18 Oct 2003 11:39:27 +1000

> In the SYNOPSIS example I use $top->wrapper->[0].

I'm surprised this works. In a simple test script Perl spewed out
an error on a similar line of code.

In the end I ended up using:

$toplevel->frame();

which gave me what I wanted.

frame() & wrapper() tend to do counter-intuitive things. At least
to my way of thinking.

SCoTT. :)