From 22fe4e92c791d5ed19dad2e2a467f5a32af16167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 13 Jul 2019 02:17:20 +0200 Subject: [PATCH] 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 33233db90..bbc1be499 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) {