http://www.perlmonks.org?node_id=161551

stefan k has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Monks,
I seek wisdom in the creation of transparent windows with gtk-perl. Of course I know about the famous tutorial but I didn't find what I search for there and thus I am in desperate need for your wise input.
Furthermore I'm wondering whether one can create only a transient window (w/o parent toplevel) to get a window without decorations (I could do that by matching the title in sawfish but what about others?)

Thanks in advance Brother Stefan
you begin bashing the string with a +42 regexp of confusion

Replies are listed 'Best First'.
Re: Transparent Transient Windows with Gtk-Perl
by traveler (Parson) on Apr 24, 2002 at 15:15 UTC
(bbfu) Re: Transparent Transient Windows with Gtk-Perl
by bbfu (Curate) on Apr 24, 2002 at 17:01 UTC

    I found this (more or less) in Gtk::cookbook (comes with Gtk-Perl... just do man Gtk::cookbook). Sorry, no ideas about "transparent" windows (though I'm not 100% sure what you mean by "transparent").

    #!/usr/bin/perl use warnings; use strict; use Gtk '-init'; my $mw = Gtk::Window->new(); my $lb = Gtk::Label->new("This is only a test."); $mw->border_width(5); $mw->add($lb); $mw->signal_connect('key_press_event', sub { Gtk->main_quit; 1 }); ############################### # Note that you have to realize it # before you can access $mw->window $mw->realize; $mw->window->set_decorations(0); ############################### $mw->show_all; Gtk->main;

    bbfu
    Black flowers blossum
    Fearless on my breath