diff --git a/src/login/mod.rs b/src/login/mod.rs index d8c1f8d9..f9b308f8 100644 --- a/src/login/mod.rs +++ b/src/login/mod.rs @@ -571,6 +571,10 @@ impl Login { ); return; } + + session.connect_ready(clone!(@weak self as obj => move |_| { + obj.clean(); + })); }; session.prepare(client, session_info).await; diff --git a/src/window.rs b/src/window.rs index 30ad47fa..56d329e0 100644 --- a/src/window.rs +++ b/src/window.rs @@ -182,9 +182,6 @@ impl Window { // We need to grab the focus so that keyboard shortcuts work session.grab_focus(); - session.connect_ready(clone!(@weak self as obj => move |_| { - obj.imp().login.clean(); - })); session.connect_logged_out(clone!(@weak self as obj => move |session| { obj.remove_session(session) }));