From 5aa3a288dcdb90e70091768483812d67aad3a8e7 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 3 Sep 2013 15:57:05 -0400 Subject: [PATCH] display: Add some missing breaks If we somehow get an event with a wrong device ID, we should not be comparing bad event IDs. --- src/core/display.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/display.c b/src/core/display.c index 3f3a45f74..755b97034 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -1855,14 +1855,17 @@ get_input_event (MetaDisplay *display, case XI_ButtonRelease: if (((XIDeviceEvent *) input_event)->deviceid == META_VIRTUAL_CORE_POINTER_ID) return input_event; + break; case XI_KeyPress: case XI_KeyRelease: if (((XIDeviceEvent *) input_event)->deviceid == META_VIRTUAL_CORE_KEYBOARD_ID) return input_event; + break; case XI_FocusIn: case XI_FocusOut: if (((XIEnterEvent *) input_event)->deviceid == META_VIRTUAL_CORE_KEYBOARD_ID) return input_event; + break; case XI_Enter: case XI_Leave: if (((XIEnterEvent *) input_event)->deviceid == META_VIRTUAL_CORE_POINTER_ID)