Subject: PATCH: bugfix for Perl/Tk modules.

From: Scott Smedley <[email-masked]>
Date: Tue, 11 Nov 2003 23:48:45 +1100

Hi Mikhael,

After much investigation I tracked down the cause of the bug in
my FvwmTabs module. It was causing my toplevel windows to get destroyed
before the ON_EXIT handler was invoked, as I suspected.

DeePBLue>> cvs diff -u Tk.pm 
Index: Tk.pm
===================================================================
RCS file: /home/cvs/fvwm/fvwm/perllib/FVWM/Module/Tk.pm,v
retrieving revision 1.12
diff -u -u -r1.12 Tk.pm
--- Tk.pm       25 Oct 2003 03:00:00 -0000      1.12
+++ Tk.pm       11 Nov 2003 12:50:37 -0000
@@ -51,6 +51,7 @@
        $top->fileevent($self->{istream},
                readable => sub {
                        unless ($self->processPacket($self->readPacket)) {
+                               $self->disconnect;
                                $top->destroy;
                        } else {
                                $self->eventLoopPrepared(@params);

SCoTT. :)
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 12 Nov 2003 04:16:59 +0000

> before the ON_EXIT handler was invoked, as I suspected.

The actual fix was more complex than this.

I tested several extreme cases, but not your case.
Your module may now potentially work differently on exit, so test/fix it.

Regards,
Mikhael.

---

From: Scott Smedley <[email-masked]>
Date: Thu, 13 Nov 2003 10:27:28 +1100

Hi Mikhael,

: I tested several extreme cases, but not your case.
: Your module may now potentially work differently on exit, so test/fix it.

FvwmTabs works fine with this fix.

Thank-you muchly,

SCoTT. :)