[gnome-shell] screenshot: fix off-by-one selection size
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] screenshot: fix off-by-one selection size
- Date: Sat, 14 Mar 2015 23:06:10 +0000 (UTC)
commit 6380526c12e35b6274e933639f89c3a171b74b12
Author: Clément Guérin <geecko dev free fr>
Date: Sat Mar 14 23:48:41 2015 +0100
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
js/ui/screenshot.js | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js
index 50c5f9d..3a095b1 100644
--- a/js/ui/screenshot.js
+++ b/js/ui/screenshot.js
@@ -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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]