summaryrefslogtreecommitdiffstats
path: root/perl-install/my_gtk.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/my_gtk.pm')
-rw-r--r--perl-install/my_gtk.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index c43c8f899..a102ab1f6 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -18,6 +18,7 @@ use c;
use common qw(:common :functional);
my $forgetTime = 1000; #- in milli-seconds
+my @grabbed;
$border = 5;
1;
@@ -49,11 +50,13 @@ sub show($) {
my ($o) = @_;
$o->{window}->show;
$o->{rwindow}->show;
- $o->{rwindow}->grab_add if $my_gtk::grab || $o->{grab};
+ top(@grabbed)->grab_remove if @grabbed;
+ push(@grabbed, $o->{rwindow}), $o->{rwindow}->grab_add if $my_gtk::grab || $o->{grab};
}
sub destroy($) {
my ($o) = @_;
- $o->{rwindow}->grab_remove if $my_gtk::grab || $o->{grab};
+ (pop @grabbed)->grab_remove if @grabbed;
+ top(@grabbed)->grab_add if @grabbed;
$o->{rwindow}->destroy;
flush();
}