[gnome-shell] workspace: Only create one strategy
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspace: Only create one strategy
- Date: Sat, 20 Apr 2013 12:34:04 +0000 (UTC)
commit b41902f4df3ffdfdc38c0d47e55f61912eb548fa
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Feb 25 19:31:03 2013 -0500
workspace: Only create one strategy
Now that we don't have any other strategies but the unaligned
one, we only need to construct it once.
https://bugzilla.gnome.org/show_bug.cgi?id=694469
js/ui/workspace.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 67f3b93..6405050 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -1475,6 +1475,8 @@ const Workspace = new Lang.Class({
let lastLayout = {};
+ let strategy = new UnalignedLayoutStrategy(this._monitor, rowSpacing, columnSpacing);
+
for (let numRows = 1; ; numRows++) {
let numColumns = Math.ceil(windows.length / numRows);
@@ -1484,8 +1486,6 @@ const Workspace = new Lang.Class({
if (numColumns == lastLayout.numColumns)
break;
- let strategy = new UnalignedLayoutStrategy(this._monitor, rowSpacing, columnSpacing);
-
let layout = { area: area, strategy: strategy, numRows: numRows, numColumns: numColumns };
strategy.computeLayout(windows, layout);
strategy.computeScaleAndSpace(layout);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]