Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Perl Tk Active Window

by zentara (Archbishop)
on Aug 18, 2012 at 09:19 UTC ( #988183=note: print w/ replies, xml ) Need Help??


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; }

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh


Comment on Re: Perl Tk Active Window
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://988183]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2014-09-20 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (152 votes), past polls