diff options
Diffstat (limited to 'perl-install/mygtk2.pm')
-rw-r--r-- | perl-install/mygtk2.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index 3067df65f..8cb691002 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -1182,7 +1182,13 @@ sub flush() { sub may_destroy { my ($w) = @_; - $w->destroy if $w; + return if !$w; + @::main_windows = difference2(\@::main_windows, [ $w->{real_window} ]); + if ($::main_window eq $w->{real_window}) { + undef $::main_window; + $::main_window = $::main_windows[-1]; + } + $w->destroy; } sub root_window() { |