Changeset 4570 for branches/1.3


Ignore:
Timestamp:
Jul 22, 2014, 2:48:15 PM (5 years ago)
Author:
gah
Message:

fix sticky global grab

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3/gui/scripts/grab.tcl

    r3330 r4570  
    3939# ----------------------------------------------------------------------
    4040rename grab _tk_grab
    41 proc grab {args} {
     41proc grab { args } {
    4242    set op [lindex $args 0]
    4343    if {[winfo exists $op]} {
     
    5454        set state $::Rappture::grab::state
    5555        set window [lindex $args end]
     56
    5657        if {[lsearch -exact $args -global] >= 0} {
    5758            set state "-global"
     
    9192
    9293        # and set the next one
    93         if {"" != $window} {
    94             if {[lindex $window 0] != "-global"} {
    95                 # no more global grabs -- resume local grabs
    96                 set ::Rappture::grab::state ""
    97             }
     94        if {[lindex $window 0] != "-global"} {
     95            # no more global grabs -- resume local grabs
     96            set ::Rappture::grab::state ""
     97        }
     98        if { $window != "" } {
    9899            eval _grabset $window
    99100        }
Note: See TracChangeset for help on using the changeset viewer.