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
This commit is contained in:
Marco Trevisan (Treviño) 2019-07-13 02:17:20 +02:00 committed by Florian Müllner
parent 91eb84fa4e
commit 22fe4e92c7

View File

@ -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) {