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.
This commit is contained in:
parent
f95ba881f0
commit
cff3685a4c
Notes:
sideshowbarker
2024-07-19 14:25:49 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/cff3685a4c6
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue