An array is used to translate the button to its mask. Clutter defines
the masks for button 1 to 5 but we report BTN_LEFT..BTN_TASK ie
0x110..0x117. We need to pad the array for the translation not to access
random data for buttons between 0x115 and 0x117.
ClutterEvent *event;
ClutterActor *stage;
gint button_nr;
- static gint maskmap[5] =
+ static gint maskmap[8] =
{
CLUTTER_BUTTON1_MASK, CLUTTER_BUTTON2_MASK, CLUTTER_BUTTON3_MASK,
- CLUTTER_BUTTON4_MASK, CLUTTER_BUTTON5_MASK
+ CLUTTER_BUTTON4_MASK, CLUTTER_BUTTON5_MASK, 0, 0, 0
};
stage = clutter_stage_get_default ();