@@ -127,13 +127,10 @@ public class Monitor.MainWindow : Hdy.ApplicationWindow {
127127 key_press_event.connect ((e ) => shortcuts.handle (e ));
128128
129129 this.delete_event.connect (() => {
130- int window_width, window_height, position_x, position_y ;
130+ int window_width, window_height;
131131 get_size (out window_width, out window_height);
132- get_position (out position_x, out position_y);
133132 MonitorApp . settings. set_int (" window-width" , window_width);
134133 MonitorApp . settings. set_int (" window-height" , window_height);
135- MonitorApp . settings. set_int (" position-x" , position_x);
136- MonitorApp . settings. set_int (" position-y" , position_y);
137134 MonitorApp . settings. set_boolean (" is-maximized" , this . is_maximized);
138135
139136 MonitorApp . settings. set_string (" opened-view" , stack. visible_child_name);
@@ -160,15 +157,6 @@ public class Monitor.MainWindow : Hdy.ApplicationWindow {
160157 if (MonitorApp . settings. get_boolean (" is-maximized" )) {
161158 this . maximize ();
162159 }
163-
164- int position_x = MonitorApp . settings. get_int (" position-x" );
165- int position_y = MonitorApp . settings. get_int (" position-y" );
166- if (position_x == - 1 || position_y == - 1 ) {
167- // -1 is default value of these keys, which means this is the first launch
168- this . window_position = Gtk . WindowPosition . CENTER ;
169- } else {
170- move (position_x, position_y);
171- }
172160 }
173161
174162}
0 commit comments