in reply to
Perl Tk Active Window
Using a timer used to work, but I just tested it, and it dosn't raise the window, it just flashes its icon. You could try $mw->overrideredirect(1); but it will show up on all virtual desktops. As an alternative, Gtk2 has a more flexible override which allows
the override on each virtual desktop of your system.
#!/usr/bin/perl
use warnings;
use strict;
use Glib qw/TRUE FALSE/;
use Gtk2 '-init';
my $window = Gtk2::Window->new();
#$window->set_decorated(0);
#Gtk2::Window::set_decorated($window, 0);
#print $window->get_decorated(),"\n";
#$window->stick;
#$window->unstick;
#Gtk2::Window::set_keep_above($window, 1);
$window->set_keep_above(1);
$window ->signal_connect( 'destroy' => \&delete_event );
$window->set_border_width(10);
$window->set_size_request(300,200);
my $button = Gtk2::Button->new_from_stock('gtk-quit');
$window->add( $button);
$button->signal_connect( clicked => \&delete_event );
$window->set_position('center');
$window->show_all();
$window->stick;
Gtk2->main;
#####################################
sub delete_event {
Gtk2->main_quit;
return FALSE;
}