1
0
Fork 0

wayland: Fix thinko checking for pointers with pressed buttons

These are bail out paths, so we should ignore pointers with no
buttons pressed. Spotted by Jonas Ådahl.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3821>
(cherry picked from commit 6f2f4c5767)
This commit is contained in:
Carlos Garnacho 2024-06-17 20:27:53 +02:00 committed by Jonas Ådahl
parent 7d0d0edda7
commit b9693fe333

View file

@ -1108,10 +1108,10 @@ find_dnd_candidate_device (ClutterStage *stage,
if (!sequence)
{
if (modifiers &
(CLUTTER_BUTTON1_MASK | CLUTTER_BUTTON2_MASK |
CLUTTER_BUTTON3_MASK | CLUTTER_BUTTON4_MASK |
CLUTTER_BUTTON5_MASK))
if ((modifiers &
(CLUTTER_BUTTON1_MASK | CLUTTER_BUTTON2_MASK |
CLUTTER_BUTTON3_MASK | CLUTTER_BUTTON4_MASK |
CLUTTER_BUTTON5_MASK)) == 0)
return TRUE;
}