fix scrolling affecting all widgets

This commit is contained in:
hippoz 2022-11-10 20:18:28 +02:00
parent 3fa1647fc9
commit 6e16ab35cd
No known key found for this signature in database
GPG key ID: 7C52899193467641

View file

@ -252,12 +252,12 @@ void Widget::handle_mouse_button_event(MouseButtonEvent &event) {
update_activation_to = true; update_activation_to = true;
} }
if (!m_rect.contains(event.point())) { if (m_rect.contains(event.point())) {
on_mouse_button(event);
} else {
update_activation_to = false; update_activation_to = false;
} }
on_mouse_button(event);
if (m_is_active != update_activation_to || (update_activation_to && m_window->active_widget() != this)) { if (m_is_active != update_activation_to || (update_activation_to && m_window->active_widget() != this)) {
m_is_active = update_activation_to; m_is_active = update_activation_to;
if (m_is_active && m_window) if (m_is_active && m_window)