From: <no...@so...> - 2002-05-20 18:36:38
|
Bugs item #410389, was opened at 2001-03-21 17:01 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112997&aid=410389&group_id=12997 Category: 55. [grab] Group: = 8.3.2 Status: Open Resolution: None Priority: 5 Submitted By: Tupone Alfredo (atupone) Assigned to: Jeffrey Hobbs (hobbs) Summary: grab with multiple interpreter Initial Comment: I am running an application with multiple interpreter. If I make a local grab on one window in an interpreter, and I ask on another interpreter who is grabbing, it reports the name of the window the other interpreter is grabbing. This is creating a problem, particularly because the menu posting, as is in the tk library file menu.tcl, is looking for this and trying to remove the old grab on an unexisting window ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2002-05-20 14:36 Message: Logged In: YES user_id=80530 That's good to hear. Is your fix available to contribute back to Tk ? ---------------------------------------------------------------------- Comment By: Tupone Alfredo (atupone) Date: 2002-05-16 15:15 Message: Logged In: YES user_id=76397 My fix to tk, outlined in the followup dated 2001-04-03 01:14, works! At least in my environment. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2002-05-14 18:06 Message: Logged In: YES user_id=80530 I just re-discovered this problem. I'm assigning it to the [grab]-area maintainer. I'm attaching a demonstration script. Evaluate it with wish and there will be three windows. An empty root window and a [tk_getOpenFile] window from the master interp, and another root window with a "File" menu from the slave interp. The [tk_getOpenFile] widget holds a grab. Click on the "File" menu of the slave window, and and error will be reported as the slave interp tries to operate on the window reported back by [grab current], which exists in the master, not the slave. It appears that [grab] is storing the window holding the grab in a TkDisplay structure which is shared among interps. If Tk is going to assume that different interps are separate "applications" with separate widget trees, then such information should probably be kept per-interp, thus not in the TkDisplay structure. ---------------------------------------------------------------------- Comment By: Tupone Alfredo (atupone) Date: 2001-04-02 19:14 Message: Logged In: YES user_id=76397 The previous patch did not work, 'cause th display structure don't get freed when the tcl interpreter is deleted. So we got a big memory leak and we do not want. Now I'm trying to move some grab info from the display structure, to the TkMain, that is interpreter specific. In this way I do not create more Item that will not be deleted. Seems to work .... I hope ---------------------------------------------------------------------- Comment By: Tupone Alfredo (atupone) Date: 2001-03-22 11:01 Message: Logged In: YES user_id=76397 I Think I have fixed this problem inserting a field (Tcl_Interp* interp) in the TkDisplay structure. Testing and filling it in the GetScreen on file tkWindow.c ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112997&aid=410389&group_id=12997 |