Artifacts Associated With Ticket 469272ffffffffff
Ticket change [ae75e32a26] (rid 101641) by gauravdj on 2001-10-08 20:33:36:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
On solaris In case tcl takes somelong time to execute something and you click on the menu and changes the workspace before that execution is completed tcl fails the grab -global $menu in tkMenuButtonDown fails try this use a.tcl click on "file" click test click edit and then change the workspace *********************************************** contents of a.tcl *********************************************** menu .m menu .file menu .edit .m add cascade -menu .file -label File .file add command -label "Test" -command longtime .m add cascade -menu .edit -label Edit .edit add command -label "Hello" . configure -menu .m proc longtime {} { after 5000 puts "POSTED" } proc tkMenuButtonDown menu { global tkPriv global tcl_platform if {![winfo viewable $menu]} { return } $menu postcascade active if {[string compare $tkPriv(postedMb) ""] && \ [winfo viewable $tkPriv(postedMb)]} { grab -global $tkPriv(postedMb) } else { while {[string equal [$menu cget - type] "normal"] \ && [string equal [winfo class [winfo parent $menu]] "Menu"] \ && [winfo ismapped [winfo parent $menu]]} { set menu [winfo parent $menu] } if {[string equal $tkPriv(menuBar) {}]} { set tkPriv(menuBar) $menu set tkPriv(cursor) [$menu cget -cursor] $menu configure -cursor arrow } # Don't update grab information if the grab window isn't changing. # Otherwise, we'll get an error when we unpost the menus and # restore the grab, since the old grab window will not be viewable # anymore. if {[string compare $menu [grab current $menu]]} { tkSaveGrabInfo $menu } # Must re-grab even if the grab window hasn't changed, in order # to release the implicit grab from the button press. if {[string equal $tcl_platform (platform) "unix"]} { puts "MAPPED [winfo ismapped $menu]" puts "VIEWABLE [winfo viewable $menu]" puts "STATE [wm state [winfo toplevel $menu]]" grab -global $menu } } } - foundin initialized to: "obsolete: 8.3b2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "gauravdj"
- subsystem initialized to: "05. XT Notifier"
- title initialized to: "tk fails to grab if the workspace change"
- type initialized to: "Bug"
Ticket change [4e9b2d3b7d] (rid 125673) by dkf on 2001-10-09 16:37:41:
- assignee changed to: "dkf"
- closedate changed to: "2001-10-09T09:37:41"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 This is not a tcl bug. (And it works for me in 8.3.2 too.)
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- subsystem changed to: "69. Other"
- username: "dkf"