From 6e16ab35cd9d72e0b779d5f32f1d18ead9c8941c Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Thu, 10 Nov 2022 20:18:28 +0200 Subject: [PATCH] fix scrolling affecting all widgets --- src/Widget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Widget.cpp b/src/Widget.cpp index 5ca0e72..6cd3453 100644 --- a/src/Widget.cpp +++ b/src/Widget.cpp @@ -252,12 +252,12 @@ void Widget::handle_mouse_button_event(MouseButtonEvent &event) { 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; } - on_mouse_button(event); - if (m_is_active != update_activation_to || (update_activation_to && m_window->active_widget() != this)) { m_is_active = update_activation_to; if (m_is_active && m_window)