attempts at making events better, with setting the window-ptr to a weak-ptr