[gnome-shell/gnome-3-38] magnifier: Remove needless actor
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-38] magnifier: Remove needless actor
- Date: Fri, 9 Jul 2021 22:23:19 +0000 (UTC)
commit da8f9217e7c6d40ff7e4b406312c40dbbf4a67be
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jun 28 18:06:47 2021 +0200
magnifier: Remove needless actor
For the pointer clone, we actually have 2 actors (one that contains
the sprite, another that moves around). These can just be the same.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1902>
(cherry picked from commit c449058d447c2588de81df2e2bd7a1ae98c4060f)
js/ui/magnifier.js | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js
index 074af5d8ed..a92ec14da0 100644
--- a/js/ui/magnifier.js
+++ b/js/ui/magnifier.js
@@ -100,15 +100,12 @@ var Magnifier = class Magnifier {
this._mouseSprite = new Clutter.Actor({ request_mode: Clutter.RequestMode.CONTENT_SIZE });
this._mouseSprite.content = new MouseSpriteContent();
- this._cursorRoot = new Clutter.Actor();
- this._cursorRoot.add_actor(this._mouseSprite);
-
// Create the first ZoomRegion and initialize it according to the
// magnification settings.
[this.xMouse, this.yMouse] = global.get_pointer();
- let aZoomRegion = new ZoomRegion(this, this._cursorRoot);
+ let aZoomRegion = new ZoomRegion(this, this._mouseSprite);
this._zoomRegions.push(aZoomRegion);
this._settingsInit(aZoomRegion);
aZoomRegion.scrollContentsTo(this.xMouse, this.yMouse);
@@ -272,7 +269,7 @@ var Magnifier = class Magnifier {
* @returns {ZoomRegion} the newly created ZoomRegion.
*/
createZoomRegion(xMagFactor, yMagFactor, roi, viewPort) {
- let zoomRegion = new ZoomRegion(this, this._cursorRoot);
+ let zoomRegion = new ZoomRegion(this, this._mouseSprite);
zoomRegion.setViewPort(viewPort);
// We ignore the redundant width/height on the ROI
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]