grabHelper: Remove support for untracked grabs

https://bugzilla.gnome.org/show_bug.cgi?id=682243
This commit is contained in:
Florian Müllner 2012-09-15 19:14:52 +02:00
parent 906368d916
commit ef7b74a104

View File

@ -85,11 +85,7 @@ const GrabHelper = new Lang.Class({
}, },
get currentGrab() { get currentGrab() {
let idx = this._grabStack.length - 1; return this._grabStack[this._grabStack.length - 1] || {};
while (idx >= 0 && this._grabStack[idx].untracked)
idx--;
return this._grabStack[idx] || {};
}, },
_findStackIndex: function(actor) { _findStackIndex: function(actor) {
@ -138,14 +134,9 @@ const GrabHelper = new Lang.Class({
// input mode to %Shell.StageInputMode.FOCUSED, and ungrab() will // input mode to %Shell.StageInputMode.FOCUSED, and ungrab() will
// revert it back, and re-focus the previously-focused window (if // revert it back, and re-focus the previously-focused window (if
// another window hasn't been explicitly focused before then). // another window hasn't been explicitly focused before then).
//
// If @params contains { untracked: true }, then it will be skipped
// when the grab helper ungrabs for you, or when calculating
// currentGrab.
grab: function(params) { grab: function(params) {
params = Params.parse(params, { actor: null, params = Params.parse(params, { actor: null,
modal: false, modal: false,
untracked: false,
grabFocus: false, grabFocus: false,
onUngrab: null }); onUngrab: null });