Pavel Rousnak <[EMAIL PROTECTED]> wrote:
> I don't know how to do this with Perl.
> I had the problem like this and didn't find anything better than
> low-level Xlib function XIconifyWindow:
>
> private = (GdkWindowPrivate*)widget->window;
> if (!private->destroyed)
> XIconifyWindow(private->xdisplay, private->xwindow, 0);
>
I glued this Xlib function to Perl using Inline C:
<code>
#!/usr/bin/perl
use Inline C => 'DATA' =>
INC => `gtk-config --cflags`,
LIBS => `gtk-config --libs`;
use Gtk;
init Gtk;
$window = new Gtk::Window();
$button = new Gtk::Button('minimize');
$button->signal_connect('clicked', sub {
iconify($window->window->XDISPLAY(), $window->window->XWINDOW());
});
$window->add($button);
$window->show_all();
main Gtk;
__DATA__
__C__
void iconify(int xdisplay, int xwindow) {
XIconifyWindow(xdisplay, xwindow, 0);
}
</code>
--
Jens Luedicke
[EMAIL PROTECTED]