Skip to content
Tcl Source Code History Of Ticket 469272ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 469272ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 469272ffffffffffffffffffffffffffffffffff

  1. Ticket change [ae75e32a26] (rid 101641) by gauravdj on 2001-10-08 20:33:36:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. 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
      }
          }
      }
      
      
    4. foundin initialized to: "obsolete: 8.3b2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "gauravdj"
    9. subsystem initialized to: "05. XT Notifier"
    10. title initialized to: "tk fails to grab if the workspace change"
    11. type initialized to: "Bug"
  2. Ticket change [4e9b2d3b7d] (rid 125673) by dkf on 2001-10-09 16:37:41:

    1. assignee changed to: "dkf"
    2. closedate changed to: "2001-10-09T09:37:41"
    3. closer changed to: "dkf"
    4. icomment:
      Logged In: YES 
      user_id=79902
      
      This is not a tcl bug. (And it works for me in 8.3.2 too.)
      
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. resolution changed to: "Invalid"
    8. status changed to: "Closed"
    9. subsystem changed to: "69. Other"
    10. username: "dkf"