window: Filter out buttons when checking if the event is unmodified

This commit is contained in:
Jasper St. Pierre 2014-08-15 08:39:01 -04:00
parent 31361e464a
commit a5f993f269

View File

@ -7912,7 +7912,11 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
* care about. Just let the event through.
*/
unmodified = event->button.modifier_state == 0;
const int CLUTTER_BUTTON_MASK = (CLUTTER_BUTTON1_MASK | CLUTTER_BUTTON2_MASK |
CLUTTER_BUTTON3_MASK | CLUTTER_BUTTON4_MASK |
CLUTTER_BUTTON5_MASK);
unmodified = (event->button.modifier_state & ~CLUTTER_BUTTON_MASK) == 0;
is_window_grab = button_event_is_window_grab (display, event);
if (unmodified)