When an item in a cascade from a tearoff is invoked,
and the cascade overlaps the tearoff, both the command
in the cascade and in its parent can be invoked.
Expected behavior: Only the command in the cascade
should be invoked. *Probably, the cascade should be
placed so that it does not overlap the tearoff at all*
How to reproduce: Execute the attached script by
running "source menutest.tcl" from wish. Tear off the
"Test" menu. Drag the tearoff to the extreme right
side of the screen. Post the cascade, then invoke a
command from it (it may help if the mouse pointer is
near the left hand side of the cascade). Output reads
something like
% source x:/menutest.tcl
Invoked 0
Invoked Sub0
%
but it should only say
Invoked Sub0
This problem existed as early as 8.2.1, and still
exists in 8.4a2. None of the CVS changes since 8.4a2
looked relevant to this problem, and no newer Windows
installers were available.
menutest.tcl -- program demonstrating the problem
Logged In: YES
user_id=92123
I have verified that this is still a problem on windows with
a fresh
checkout from the CVS head (8.5a0).
Logged In: YES
user_id=79902
Confirmed with 8.4.4; why is the event going to both the
submenu and the tearoff which is its parent?
This might also be causing some of the other bizarre
problems, whereby the cascade refuses to pop up again until
the torn-off window has had another click in it first
(though that click does not need to invoke any menu items.)