summaryrefslogtreecommitdiffstats
path: root/perl-install/my_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-20 23:41:53 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-20 23:41:53 +0000
commit07c2762226623bc37c5daf67028ff42576f80b31 (patch)
treebe68e1ccc132a9d9c81407754e62f20a708107de /perl-install/my_gtk.pm
parent6ed08c4075c165b1a94f14dcbce1b342180a823f (diff)
downloaddrakx-backup-do-not-use-07c2762226623bc37c5daf67028ff42576f80b31.tar
drakx-backup-do-not-use-07c2762226623bc37c5daf67028ff42576f80b31.tar.gz
drakx-backup-do-not-use-07c2762226623bc37c5daf67028ff42576f80b31.tar.bz2
drakx-backup-do-not-use-07c2762226623bc37c5daf67028ff42576f80b31.tar.xz
drakx-backup-do-not-use-07c2762226623bc37c5daf67028ff42576f80b31.zip
- in destroy, detect if program is going to leave, in that case
don't do anything, especially don't set the waiting mouse cursor another thing is that calling flush() at this moment causes segfault so don't do it and no more segfault :) (now, if someone finds out what this 4 is about... but you cares, it works :) this fixes program ending on an exception - also add END() calling exit() (in case a program forgets to (heurk) call exit())
Diffstat (limited to 'perl-install/my_gtk.pm')
-rw-r--r--perl-install/my_gtk.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 356b494ea..17466149a 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -125,6 +125,13 @@ sub show($) {
}
sub destroy($) {
my ($o) = @_;
+ return if $^S & 4;
+ #- program is going to leave
+ #- don't do anything, especially don't set the waiting mouse cursor
+ #- another thing is that calling flush() at this moment causes segfault
+ #- so don't do it and no more segfault :)
+ #- (now, if someone finds out what this 4 is about... but you cares, it works :)
+
$o->{rwindow} and $o->{rwindow}->destroy;
gtkset_mousecursor_wait();
flush();
@@ -143,6 +150,9 @@ sub exit {
c::_exit($_[1]) #- workaround
}
+#- in case "exit" above was not called by the program
+END { &exit() }
+
#-###############################################################################
#- createXXX functions