s [list $w]] == 1}]
	    }
	}
    }
}

## ttk::focusFirst $w --
#	Return the first descendant of $w, in preorder traversal order,
#	that can take keyboard focus, "" if none do.
#
# See also: tk_focusNext
#

proc ttk::focusFirst {w} {
    if {[ttk::takesFocus $w]} {
	return $w
    }
    foreach child [winfo children $w] {
	if {[set c [ttk::focusFirst $child]] ne ""} {
	    return $c
	}
    }
    return ""
}

### Grabs.
#
# Rules:
#	Each call to [grabWindow $w] or [globalGrab $w] must be
#	matched with a call to [releaseGrab $w] in LIFO order.
#
#	Do not call [grabWindow $w] for a window that currently
#	appears on the grab stack.
#
#	See #1239190 and #1411983 for more discussion.
#
namespace eval ttk {
    variable Grab 		;# map: window name -> grab token

    # grab token details:
    #	Two-element list containing:
    #	1) a script to evaluate to restore the previous grab (if any);
    #	2) a script to evaluate to restore the focus (if any)
}

## SaveGrab --
#	Record current grab and focus windows.
#
proc ttk::SaveGrab {w} {
    variable Grab

    if {[info exists Grab($w)]} {
	# $w is already on the grab stack.
	# This should not happen, but bail out in case it does anyway:
	#
	return
    }

    set restoreGrab [set restoreFocus ""]

    set grabbed [grab current $w]
    if {[winfo exists $grabbed]} {
    	switch [grab status $grabbed] {
	    global { set restoreGrab [list grab -global $grabbed] }
	    local  { set restoreGrab [list grab $grabbed] }
	    none   { ;# grab window is really in a different interp }
	}
    }

    set focus [focus]
    if {$focus ne ""} {
    	set restoreFocus [list focus -force $focus]
    }

    set Grab($w) [list $restoreGrab $restoreFocus]
}

## RestoreGrab --
#	Restore previous grab and focus windows.
#	If called more than once without an intervening [SaveGrab $w],
#	does nothing.
#
proc ttk::RestoreGrab {w} {
    variable Grab

    if {![info exists Grab($w)]} {	# Ignore
	return;
    }

    # The previous grab/focus window may have been destroyed,
    # unmapped, or some other {
  "_args": [
    [
      "vscode-debugadapter@1.28.0",
      "E:\\A\\_work\\52\\s"
    ]
  ],
  "_from": "vscode-debugadapter@1.28.0",
  "_id": "vscode-debugadapter@1.28.0",
  "_inBundle": false,
  "_integrity": "sha512-GCR1326LFtfYjl7SDN1wmU2pBJ98HgUCnbWoU3s3bz0GhUWYN1xSYGg7MfuwxY6WwZk2cuqzANhy/oaKADMXaw==",
  "_location": "/vscode-chrome-debug-core/vscode-debugadapter",
  "_phantomChildren": {},
  "_requested": {
    "type": "version",
    "registry": true,
    "raw": "vscode-debugadapter@1.28.0",
    "name": "vscode-debugadapter",
    "escapedName": "vscode-debugadapter",
    "rawSpec": "1.28.0",
    "saveSpec": null,
    "fetchSpec": "1.28.0"
  },
  "_requiredBy": [
    "/vscode-chrome-debug-core"
  ],
  "_resolved": "https://registry.npmjs.org/vscode-debugadapter/-/vscode-debugadapter-1.28.0.tgz",
  "_spec": "1.28.0",
  "_where": "E:\\A\\_work\\52\\s",
  "author": {
    "name": "Microsoft Corporation"
  },
  "bugs": {
    "url": "https://github.com/Microsoft/vscode-debugadapter-node/issues"
  },
  "dependencies": {
    "vscode-debugprotocol": "1.28.0",
    "vscode-uri": "1.0.1"
  },
  "description": "Debug adapter implementation for node",
  "devDependencies": {
    "@types/node": "7.0.43",
    "typescript": "2.6.1"
  },
  "homepage": "https://github.com/Microsoft/vscode-debugadapter-node#readme",
  "license": "MIT",
  "main": "./lib/main.js",
  "name": "vscode-debugadapter",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/Microsoft/vscode-debugadapter-node.git"
  },
  "scripts": {
    "compile": "tsc -p ./src",
    "prepublish": "tsc -p ./src",
    "watch": "tsc -w -p ./src"
  },
  "typings": "./lib/main",
  "version": "1.28.0"
}
