STk 3.99 menu unpost bug

From: Sarah Calvo <>
Date: Wed, 28 Apr 1999 12:02:02 -0400

Hi all,

I encountered an extremenly annoying menu bug in STk 3.99.4 with the
following behavior:

1) Click on a menu (this posts the menu)
2) Click on the window's title bar to unpost the menu, but accidently
move the window.
   Click on any other window in the screen

The menu does not unpost, and remains on the screen unattached to it's

I eventually tracked this bug down in the menu.stk code, and found that
it was caused by the menu's post routine setting the grab to be local,
rather than global. A local grab does not recieve events in the
window's title bar, or in other windows.

The code that I needed to change in order to fix my bug had the comment:

 (grab menu) ;; In Tcl/Tk, grab was :global

so clearly this was a deliberate choice to make the grab local rather
than global. Does anyone know why a local grab would be in any way
preferred over a global one? Is there some bug in using the global grab
that I haven't encountered yet?


Sarah Calvo Phone: 607-273-7340
GrammaTech, Inc. Email:
Ithaca, NY 14850 Web:
Received on Wed Apr 28 1999 - 18:12:04 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST