dont accept events if we did not init yet

This commit is contained in:
hippoz 2022-07-26 17:26:18 +03:00
parent 913240c33b
commit 9f52cad7e9
Signed by: hippoz
GPG key ID: 7C52899193467641

View file

@ -273,7 +273,7 @@ void Widget::handle_mouse_button_event(MouseButtonEvent &event) {
} }
void Widget::dispatch_event(Event &event) { void Widget::dispatch_event(Event &event) {
if (!m_accepts_events) if (!m_accepts_events || !m_did_init)
return; return;
on_event(event); on_event(event);