Made new windows position themselves randomly.
[philo.git] / contrib / gilbert / media / gilbert / lib / app.js
index d68e10c..f2f1aa4 100644 (file)
@@ -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 () {