Commit ab935b8e authored by Florian Müllner's avatar Florian Müllner

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
parent e6b3bd19
......@@ -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>
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment