From 026fd4cf3560711169541e6a57562a5fc1289774 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 11 Sep 2013 10:41:54 -0400 Subject: [PATCH] workspace: Punt the geometry-fizzling-out logic here --- js/ui/workspace.js | 19 +++++++++++++++++++ js/ui/workspacesView.js | 19 ------------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 7bd153bee..ee3b636f5 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -892,6 +892,19 @@ function padArea(area, padding) { }; } +function rectEqual(one, two) { + if (one == two) + return true; + + if (!one || !two) + return false; + + return (one.x == two.x && + one.y == two.y && + one.width == two.width && + one.height == two.height); +} + /** * @metaWorkspace: a #Meta.Workspace, or null */ @@ -967,11 +980,17 @@ const Workspace = new Lang.Class({ }, setFullGeometry: function(geom) { + if (rectEqual(this._fullGeometry, geom)) + return; + this._fullGeometry = geom; this._recalculateWindowPositions(WindowPositionFlags.NONE); }, setActualGeometry: function(geom) { + if (rectEqual(this._actualGeometry, geom)) + return; + this._actualGeometry = geom; if (this._actualGeometryLater) diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index d364de6f9..085d16223 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -23,19 +23,6 @@ const MAX_WORKSPACES = 16; const OVERRIDE_SCHEMA = 'org.gnome.shell.overrides'; -function rectEqual(one, two) { - if (one == two) - return true; - - if (!one || !two) - return false; - - return (one.x == two.x && - one.y == two.y && - one.width == two.width && - one.height == two.height); -} - const WorkspacesView = new Lang.Class({ Name: 'WorkspacesView', @@ -140,9 +127,6 @@ const WorkspacesView = new Lang.Class({ }, setFullGeometry: function(geom) { - if (rectEqual(this._fullGeometry, geom)) - return; - this._fullGeometry = geom; for (let i = 0; i < this._workspaces.length; i++) @@ -150,9 +134,6 @@ const WorkspacesView = new Lang.Class({ }, setActualGeometry: function(geom) { - if (rectEqual(this._actualGeometry, geom)) - return; - this._actualGeometry = geom; for (let i = 0; i < this._workspaces.length; i++)