Subject: Tk::Wm::iconwindow()

From: Scott Smedley <[email-masked]>
Date: Wed, 12 Nov 2003 23:12:11 +1100

>From the Tk::Wm manpage:

> $toplevel->iconwindow(?$widget?)
> ...
> Note: not all window managers support the notion of an icon window.

Does FVWM support this?

My test app suggests not.

relevant snippet:

print("iw=" . $main->iconwindow() . "\n") if ($main->state() eq 'iconic');

$main->iconwindow() returns undef.

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: Dominik Vogt <[email-masked]>
Date: Wed, 12 Nov 2003 13:26:02 +0100

> > Note: not all window managers support the notion of an icon window.

Sure.

> $main->iconwindow() returns undef.

Then you are probably not using an icon window :-)

Ciao

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 12 Nov 2003 13:00:11 +0000

> $main->iconwindow() returns undef.

Just tried, works for me like documented (you get tall greenish icon):

	my $icon = $top->Toplevel(
		-background => "rgb:80/e0/80", -width => 100, -height => 200,
	);
	$top->iconwindow($icon);

Maybe you use both Style Icon and IconOverride? Use NoIconOverride then.

Regards,
Mikhael.

---

From: Scott Smedley <[email-masked]>
Date: Thu, 13 Nov 2003 10:43:38 +1100

: > print("iw=" . $main->iconwindow() . "\n") if ($main->state() eq 'iconic');
: > 
: > $main->iconwindow() returns undef.
: 
: Then you are probably not using an icon window :-)

How can I get the default icon window? (I use a global active focus
policy in FvwmTabs & need to explicitly set the focus to the icon window
when a tab-manager window is iconified.)

> Otherwise the method returns the current icon
> window for $toplevel, or an empty string if there is no icon window
> currently specified for $toplevel.

I interpret this to mean I'll get a return value of "" if no icon
window is explicitly specified. undef is not "". (Perhaps the man
page doco is wrong?)

SCoTT. :)

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 13 Nov 2003 00:32:29 +0000

> when a tab-manager window is iconified.)

I don't think that fiddling with the focus of icons that fvwm creates is
a good thing, but I don't know about the problem.

You may get the FvwmTabs window focused if you send a single "Focus"
command to fvwm with the FvwmTabs window id context. If FvwmTabs is
iconified, then the icon window will get focus. No idea why this may be
needed though.

> window is explicitly specified. undef is not "". (Perhaps the man

fvwm does not report to Tk about windows it creates, so Tk only knows
about the windows Tk created itself and suplied as the icon hint, like in
the example I wrote previously.

If you want to know the icon that fvwm uses for a window you should
listen to M_ICON_NAME, M_ICON_FILE and M_DEFAULTICON (and probably to
iconify/deiconify too). Actually the icon id of the icon window is not
reported AFAICS, only the file name, but mini icon id is reported.
See EventNames.pm for the complete information about what is reported.

Regards,
Mikhael.