diff --git a/src/Widget.cpp b/src/Widget.cpp index efb57fc..7bc692d 100644 --- a/src/Widget.cpp +++ b/src/Widget.cpp @@ -167,6 +167,9 @@ void Widget::handle_mouse_move_event(MouseMoveEvent &event) { } } + if (m_is_focused == update_focus_to) + return; + m_is_focused = update_focus_to; auto focus_update_event = FocusUpdateEvent(update_focus_to); on_focus_update(focus_update_event); @@ -187,6 +190,9 @@ void Widget::handle_mouse_button_event(MouseButtonEvent &event) { return; } + if (m_is_active == update_activation_to) + return; + m_is_active = update_activation_to; auto activation_update_event = ActivationUpdateEvent(update_activation_to); on_activation_update(activation_update_event);