Re: The Always on top issue



muppet kirjoitti:
If you want always on top of a particular window in your application, then $window->set_transient_for ($parent_window) should do that trick in all versions of gtk+. This makes the window stay above its parent at all times, but does not prevent other windows from covering it. http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html#gtk-window- set-transient-for

Hmm, what am I doing wrong here:

8<------------
use Gtk2 '-init';
my $parent = Gtk2::Window->new;
my $event_box = Gtk2::EventBox->new;
$parent->add($event_box);
$parent->signal_connect(button_press_event => \&a);
$parent->show_all;
Gtk2->main;

sub a {
my $dialog = Gtk2::MessageDialog->new($parent,'modal','info','close','foo');
   $dialog->set_transient_for($parent);
   $dialog->run;
   $dialog->destroy;
}
8<------------

because on Windows the message dialog does not stay on top of the parent. Or is it my MinGW platform? Does this work ok in other Windows platforms?

Regards,

Ari

--
I hate to break it to you, but magic data pixies don't exist.
   -- Simon Cozens


_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


--
Prof. Ari Jolma
Geoinformaatio- ja paikannustekniikka
Geoinformation and positioning technology
Teknillinen Korkeakoulu / Helsinki University of Technology
POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]