[gnome-shell] screenshot: Return a Meta.Rectangle as geometry
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] screenshot: Return a Meta.Rectangle as geometry
- Date: Wed, 16 Oct 2019 15:32:22 +0000 (UTC)
commit 22fe4e92c791d5ed19dad2e2a467f5a32af16167
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date: Sat Jul 13 02:17:20 2019 +0200
screenshot: Return a Meta.Rectangle as geometry
Since the geometry is used as a signal parameter, this can't be used when using
a GObject based class, so use the Meta boxed type instead of a JS object.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559
js/ui/screenshot.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js
index 33233db90d..bbc1be499c 100644
--- a/js/ui/screenshot.js
+++ b/js/ui/screenshot.js
@@ -264,10 +264,12 @@ var SelectArea = class {
}
_getGeometry() {
- return { x: Math.min(this._startX, this._lastX),
- y: Math.min(this._startY, this._lastY),
- width: Math.abs(this._startX - this._lastX) + 1,
- height: Math.abs(this._startY - this._lastY) + 1 };
+ return new Meta.Rectangle({
+ x: Math.min(this._startX, this._lastX),
+ y: Math.min(this._startY, this._lastY),
+ width: Math.abs(this._startX - this._lastX) + 1,
+ height: Math.abs(this._startY - this._lastY) + 1
+ });
}
_onMotionEvent(actor, event) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]