[polari] mainWindow: Do not save window position



commit ab935b8e0a46675344dd83e00b4b4766b3a7fded
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Mar 5 21:59:08 2015 +0100

    mainWindow: Do not save window position
    
    Best practices recommend leaving window placing to the WM[0], so
    only save/restore maximization state and size.
    
    [0] https://wiki.gnome.org/HowDoI/SaveWindowState
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745717

 data/org.gnome.Polari.gschema.xml |    5 -----
 src/mainWindow.js                 |   11 -----------
 2 files changed, 0 insertions(+), 16 deletions(-)
---
diff --git a/data/org.gnome.Polari.gschema.xml b/data/org.gnome.Polari.gschema.xml
index 56ce5ba..edf75af 100644
--- a/data/org.gnome.Polari.gschema.xml
+++ b/data/org.gnome.Polari.gschema.xml
@@ -14,11 +14,6 @@
       <summary>Window size</summary>
       <description>Window size (width and height).</description>
     </key>
-    <key type="ai" name="window-position">
-      <default>[]</default>
-      <summary>Window position</summary>
-      <description>Window position (x and y).</description>
-    </key>
     <key type="b" name="window-maximized">
       <default>false</default>
       <summary>Window maximized</summary>
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 67ef986..a2fc85b 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -92,13 +92,6 @@ const MainWindow = new Lang.Class({
         if (size.length == 2)
             this.window.set_default_size.apply(this.window, size);
 
-        let position = this._settings.get_value('window-position');
-        if (position.n_children() == 2) {
-            let x = position.get_child_value(0);
-            let y = position.get_child_value(1);
-            this.window.move(x.get_int32(), y.get_int32());
-        }
-
         if (this._settings.get_boolean('window-maximized'))
             this.window.maximize();
 
@@ -125,10 +118,6 @@ const MainWindow = new Lang.Class({
 
         let size = this.window.get_size();
         this._settings.set_value('window-size', GLib.Variant.new('ai', size));
-
-        let position = this.window.get_position();
-        this._settings.set_value('window-position',
-                                 GLib.Variant.new('ai', position));
     },
 
     _onConfigureEvent: function(widget, event) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]