events: Replace a switch statement with a simple if test

This commit is contained in:
Jasper St. Pierre 2014-05-08 15:05:25 -04:00
parent f56cc1f733
commit df642b96e2

View File

@ -1926,10 +1926,7 @@ meta_display_handle_event (MetaDisplay *display,
goto out;
}
switch (event->type)
{
case CLUTTER_BUTTON_PRESS:
if (window && display->grab_op == META_GRAB_OP_NONE)
if (window && event->type == CLUTTER_BUTTON_PRESS && display->grab_op == META_GRAB_OP_NONE)
{
ClutterModifierType grab_mask;
gboolean unmodified;
@ -2083,11 +2080,6 @@ meta_display_handle_event (MetaDisplay *display,
bypass_wayland = TRUE;
}
}
break;
default:
break;
}
out:
/* If the compositor has a grab, don't pass that through to Wayland */