Commit fabb9500 authored by Daniel Garcia Moreno's avatar Daniel Garcia Moreno

fractal-gtk: Don't call quit on window delete event

The quit method of AppOp was called twice because it was called on the
window delete event closure and also in the app shutdown. This patch
removes the call in the window delete event so we only left one call.

Fix #506
parent 197e0631
......@@ -224,13 +224,10 @@ impl App {
app.op.lock().unwrap().mark_active_room_messages();
});
let app_weak = app.downgrade();
app.main_window.connect_delete_event(move |window, _| {
let app = upgrade_weak!(app_weak, Inhibit(false));
let settings: gio::Settings = gio::Settings::new("org.gnome.Fractal");
let window_state = WindowState::from_window(window);
window_state.save_in_gsettings(&settings);
app.op.lock().unwrap().quit();
Inhibit(false)
});
......
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