Skip to content

Commit 0fe9e59

Browse files
committed
replace deprecated state change with configure event
1 parent 6404b68 commit 0fe9e59

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/Application.vala

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@ public class Harvey : Gtk.Application {
6161
app_window.destroy ();
6262
}
6363
});
64-
65-
app_window.state_changed.connect (() => {
66-
int root_x, root_y;
67-
app_window.get_position (out root_x, out root_y);
68-
settings.set_int ("window-x", root_x);
69-
settings.set_int ("window-y", root_y);
70-
});
7164
}
7265

7366
public static int main (string[] args) {

src/MainWindow.vala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,13 @@ public class MainWindow : Gtk.Window {
259259
}
260260
return color;
261261
}
262+
263+
public override bool configure_event (Gdk.EventConfigure event) {
264+
int root_x, root_y;
265+
get_position (out root_x, out root_y);
266+
Harvey.settings.set_int ("window-x", root_x);
267+
Harvey.settings.set_int ("window-y", root_y);
268+
269+
return base.configure_event (event);
270+
}
262271
}

0 commit comments

Comments
 (0)