--- Tixish/Balloon.pm (revision 1452) +++ Tixish/Balloon.pm (revision 1456) @@ -169,6 +169,13 @@ sub Motion { my $client = $over; while (defined $client) { last if (exists $w->{'clients'}{$client}); + if ($client->can("MasterMenu")) { + my $master = $client->MasterMenu; + if ($master && exists $w->{'clients'}{$master}) { + $w->{'clients'}{$client} = $w->{'clients'}{$master}; + last; + } + } $client = $client->Parent; } if (defined $client) { --- Tk/Menu.pm (revision 1452) +++ Tk/Menu.pm (revision 1456) @@ -1152,6 +1152,25 @@ sub BalloonInfo } } +sub MasterMenu +{ + my ($menu) = @_; + my $pathname = $menu->PathName; + my $master_menu; + if ($pathname =~ m{#}) + { + my $master_pathname = (split m{\.}, $pathname)[-1]; + $master_pathname =~ s{#}{.}g; + $master_menu = $menu->Widget($master_pathname); + if (!Tk::Exists($master_menu)) + { + warn "Cannot find master menu <$master_pathname>"; + } + } + $master_menu; +} + + # ::tk::AmpMenuArgs -- # Processes arguments for a menu entry, turning -label option into # -label and -underline options, returned by ::tk::UnderlineAmpersand.