screenshot: fix off-by-one selection size

Selecting the whole screen made a (scr_w-1,scr_h-1) sized screenshot.

https://bugzilla.gnome.org/show_bug.cgi?id=746223
This commit is contained in:
Clément Guérin 2015-03-14 23:48:41 +01:00 committed by Jasper St. Pierre
parent fa4f6c4561
commit 6380526c12

View File

@ -283,8 +283,8 @@ const SelectArea = new Lang.Class({
_getGeometry: function() {
return { x: Math.min(this._startX, this._lastX),
y: Math.min(this._startY, this._lastY),
width: Math.abs(this._startX - this._lastX),
height: Math.abs(this._startY - this._lastY) };
width: Math.abs(this._startX - this._lastX) + 1,
height: Math.abs(this._startY - this._lastY) + 1 };
},
_onMotionEvent: function(actor, event) {