From 4e1191300b4ebea295dee07769dc9da4e7149395 Mon Sep 17 00:00:00 2001 From: Joseph Spiros Date: Tue, 22 Mar 2011 14:52:49 -0400 Subject: [PATCH] Made new windows position themselves randomly. A better solution than this should be found, but for now this will avoid confusion when many windows of the same size are stacked. --- contrib/gilbert/media/gilbert/lib/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/gilbert/media/gilbert/lib/app.js b/contrib/gilbert/media/gilbert/lib/app.js index d68e10c..f2f1aa4 100644 --- a/contrib/gilbert/media/gilbert/lib/app.js +++ b/contrib/gilbert/media/gilbert/lib/app.js @@ -292,6 +292,9 @@ Gilbert.lib.app.Application = Ext.extend(Ext.util.Observable, { minimizable: true, constrainHeader: true, })); + + win.setPosition(Math.floor(Math.random() * ((this.desktop.getInnerWidth() - win.width) - 1)), Math.floor(Math.random() * ((this.desktop.getInnerHeight() - win.height) - 1))); + win.render(this.desktop.el); if (win.modal) { win.on('show', function () { -- 2.20.1