Skip to content
Tcl Source Code Artifact [ae75e32a26]
Login

Artifact [ae75e32a26]

Artifact ae75e32a264e08de4b0a9678a8aea5d27c473cb0:

Ticket change [ae75e32a26] - New ticket [469272ffffffffff|469272ffff] <i>tk fails to grab if the workspace change</i>. by gauravdj on 2001-10-08 20:33:36.
D 2001-10-08T20:33:36
J assignee nobody
J cmimetype text/plain
J comment On\ssolaris\s\nIn\scase\stcl\stakes\ssomelong\stime\sto\sexecute\ssomething\s\nand\syou\sclick\son\sthe\smenu\sand\schanges\sthe\sworkspace\s\nbefore\sthat\sexecution\sis\scompleted\stcl\sfails\n\nthe\sgrab\s-global\s$menu\s\n\s\s\s\s\s\s\sin\stkMenuButtonDown\sfails\n\ntry\sthis\suse\sa.tcl\s\n\nclick\son\s"file"\nclick\stest\nclick\sedit\sand\sthen\schange\sthe\sworkspace\s\n\n***********************************************\ncontents\sof\sa.tcl\n***********************************************\nmenu\s.m\nmenu\s.file\nmenu\s.edit\n\n.m\sadd\scascade\s-menu\s.file\s-label\sFile\n.file\sadd\scommand\s-label\s"Test"\s-command\slongtime\n\n.m\sadd\scascade\s-menu\s.edit\s-label\sEdit\n.edit\sadd\scommand\s-label\s"Hello"\n\n.\sconfigure\s-menu\s.m\n\nproc\slongtime\s{}\s{\n\s\safter\s5000\n\s\sputs\s"POSTED"\n}\n\nproc\stkMenuButtonDown\smenu\s{\n\s\s\s\sglobal\stkPriv\n\s\s\s\sglobal\stcl_platform\n\n\s\s\s\sif\s{![winfo\sviewable\s$menu]}\s{\n\s\s\s\s\s\s\s\sreturn\n\s\s\s\s}\n\s\s\s\s$menu\spostcascade\sactive\n\s\s\s\sif\s{[string\scompare\s$tkPriv(postedMb)\s""]\s&&\s\\\n\s\s\s\s[winfo\sviewable\s$tkPriv(postedMb)]}\s{\ngrab\s-global\s$tkPriv(postedMb)\n\s\s\s\s}\selse\s{\nwhile\s{[string\sequal\s[$menu\scget\s-\ntype]\s"normal"]\s\\\n&&\s[string\sequal\s[winfo\sclass\s[winfo\s\nparent\s$menu]]\s"Menu"]\s\\\n&&\s[winfo\sismapped\s[winfo\sparent\s\n$menu]]}\s{\n\s\s\s\sset\smenu\s[winfo\sparent\s$menu]\n}\n\nif\s{[string\sequal\s$tkPriv(menuBar)\s{}]}\s{\n\s\s\s\sset\stkPriv(menuBar)\s$menu\n\s\s\s\sset\stkPriv(cursor)\s[$menu\scget\s-cursor]\n\s\s\s\s$menu\sconfigure\s-cursor\sarrow\n\s\s\s\s\s\s\s\s}\n\n#\sDon't\supdate\sgrab\sinformation\sif\sthe\sgrab\s\nwindow\sisn't\schanging.\n#\sOtherwise,\swe'll\sget\san\serror\swhen\swe\sunpost\s\nthe\smenus\sand\n#\srestore\sthe\sgrab,\ssince\sthe\sold\sgrab\swindow\s\nwill\snot\sbe\sviewable\n#\sanymore.\n\nif\s{[string\scompare\s$menu\s[grab\scurrent\s\n$menu]]}\s{\n\s\s\s\stkSaveGrabInfo\s$menu\n}\n\n#\sMust\sre-grab\seven\sif\sthe\sgrab\swindow\shasn't\s\nchanged,\sin\sorder\n#\sto\srelease\sthe\simplicit\sgrab\sfrom\sthe\sbutton\s\npress.\n\nif\s{[string\sequal\s$tcl_platform\n(platform)\s"unix"]}\s{\n\s\s\s\sputs\s"MAPPED\s[winfo\sismapped\s$menu]"\n\s\s\s\sputs\s"VIEWABLE\s[winfo\sviewable\s$menu]"\n\s\s\s\sputs\s"STATE\s[wm\sstate\s[winfo\stoplevel\s\n$menu]]"\n\s\s\s\sgrab\s-global\s$menu\n}\n\s\s\s\s}\n}\n
J foundin obsolete:\s8.3b2
J priority 5\sMedium
J resolution None
J status Open
J submitter gauravdj
J subsystem 05.\sXT\sNotifier
J title tk\sfails\sto\sgrab\sif\sthe\sworkspace\schange
J type Bug
K 469272ffffffffffffffffffffffffffffffffff
U gauravdj
Z 2f1ba37d346abf88663dddb3e395a998