From cff3685a4c64fcfe890231e03c257515bf19e674 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 1 May 2019 15:59:23 +0200 Subject: [PATCH] GButton: Handle mousemove correctly while multiple buttons are pressed. We should still update the pressed state depending on the event position, even if GMouseButton::Left is not the only button pressed. --- LibGUI/GButton.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibGUI/GButton.cpp b/LibGUI/GButton.cpp index 7ca61b85ea..48c77133d8 100644 --- a/LibGUI/GButton.cpp +++ b/LibGUI/GButton.cpp @@ -65,7 +65,7 @@ void GButton::paint_event(GPaintEvent& event) void GButton::mousemove_event(GMouseEvent& event) { - if (event.buttons() == GMouseButton::Left) { + if (event.buttons() & GMouseButton::Left) { if (is_enabled()) { bool being_pressed = rect().contains(event.position()); if (being_pressed != m_being_pressed) {