diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-04-10 15:51:50 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-04-10 15:51:50 +0000 |
commit | 94fa7ff02849e8ad9fbc975cea36b4ebcd63ca36 (patch) | |
tree | 1d0d2a08d58b0c0bab9827753c95ea9047c4d6b3 /perl-install/my_gtk.pm | |
parent | d973e2a663b01557ad6f7c0c76463b6f7deb8d2d (diff) | |
download | drakx-backup-do-not-use-94fa7ff02849e8ad9fbc975cea36b4ebcd63ca36.tar drakx-backup-do-not-use-94fa7ff02849e8ad9fbc975cea36b4ebcd63ca36.tar.gz drakx-backup-do-not-use-94fa7ff02849e8ad9fbc975cea36b4ebcd63ca36.tar.bz2 drakx-backup-do-not-use-94fa7ff02849e8ad9fbc975cea36b4ebcd63ca36.tar.xz drakx-backup-do-not-use-94fa7ff02849e8ad9fbc975cea36b4ebcd63ca36.zip |
(_create_window): XSetInputFocus done only on expose_event of the topmost window
(new): ensure only one modal
Diffstat (limited to 'perl-install/my_gtk.pm')
-rw-r--r-- | perl-install/my_gtk.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index a36a84343..d05d7b09d 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -1,4 +1,4 @@ -#-######################################################################## + #-######################################################################## #- Pixel's implementation of Perl-GTK :-) [DDX] #-######################################################################## package my_gtk; # $Id$ @@ -39,7 +39,10 @@ sub new { my $o = bless { %opts }, $type; $o->_create_window($title); while (my $e = shift @tempory::objects) { $e->destroy } - push @interactive::objects, $o unless $opts{no_interactive_objects}; + foreach (@interactive::objects) { + $_->{rwindow}->set_modal(0); + } + push @interactive::objects, $o if !$opts{no_interactive_objects}; $o->{rwindow}->set_position('center_always') if $::isStandalone; $o->{rwindow}->set_modal(1) if $my_gtk::grab || $o->{grab}; @@ -469,7 +472,7 @@ sub _create_window($$) { $w->set_title($title); - $w->signal_connect(expose_event => sub { eval { $w->window->XSetInputFocus } }) if $my_gtk::force_focus || $o->{force_focus}; + $w->signal_connect(expose_event => sub { eval { $interactive::objects[-1]{rwindow} == $w and $w->window->XSetInputFocus } }) if $my_gtk::force_focus || $o->{force_focus}; $w->signal_connect(delete_event => sub { $w->destroy; die 'wizcancel' }); $w->set_uposition(@{$my_gtk::force_position || $o->{force_position}}) if $my_gtk::force_position || $o->{force_position}; |