summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/auto/Tk/Toplevel/FG_Destroy.al
blob: e0af457799f724355fa9a2a5ba3c4d8a1ce5d570 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# NOTE: Derived from blib\lib\Tk\Toplevel.pm.
# Changes made here will be lost when autosplit is run again.
# See AutoSplit.pm.
package Tk::Toplevel;

#line 151 "blib\lib\Tk\Toplevel.pm (autosplit into blib\lib\auto\Tk\Toplevel\FG_Destroy.al)"
# tkFocusGroup_Destroy --
#
#	Cleans up when members of the focus group is deleted, or when the
#	toplevel itself gets deleted.
#
sub FG_Destroy {
    my($t, $w) = @_;
    if (!defined($w) || $t == $w) {
	delete $t->{'_fg'};
	delete $t->{'_focus'};
	delete $t->{'_FocusOut'};
	delete $t->{'_FocusIn'};
    } else {
	if (exists $t->{'_focus'}) {
	    delete $t->{'_focus'} if ($t->{'_focus'} == $w);
	}
	delete $t->{'_FocusIn'}{$w};
	delete $t->{'_FocusOut'}{$w};
    }
}

# end of Tk::Toplevel::FG_Destroy
1;