grabHelper: Make sure to return not null when the stack contains fake grabs
We did this if there's nothing in the grab stack, but didn't do this when there's no real grabs in the grab stack.
This commit is contained in:
parent
05d613f3a3
commit
eebab34b62
@ -84,14 +84,11 @@ const GrabHelper = new Lang.Class({
|
||||
},
|
||||
|
||||
get currentGrab() {
|
||||
if (!this._grabStack.length)
|
||||
return {};
|
||||
|
||||
let idx = this._grabStack.length - 1;
|
||||
while (idx >= 0 && this._grabStack[idx].untracked)
|
||||
idx--;
|
||||
|
||||
return this._grabStack[idx];
|
||||
return this._grabStack[idx] || {};
|
||||
},
|
||||
|
||||
_findStackIndex: function(actor) {
|
||||
|
Loading…
Reference in New Issue
Block a user