From 91ac44963903e915fe6fe41de658d100b4325314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 16 Mar 2018 17:08:08 +0100 Subject: [PATCH] keyboard: Fix condition != has a higher precedence than bitwise &, so we need parentheses to check for one of the values in flags. https://gitlab.gnome.org/GNOME/mutter/issues/74 --- src/wayland/meta-wayland-keyboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c index 211a127f3..d4ae4508d 100644 --- a/src/wayland/meta-wayland-keyboard.c +++ b/src/wayland/meta-wayland-keyboard.c @@ -771,8 +771,8 @@ meta_wayland_keyboard_update (MetaWaylandKeyboard *keyboard, * key events (incl. modifiers), handling those additionally will result * in doubly-pressed keys. */ - if (event->flags & - (CLUTTER_EVENT_FLAG_SYNTHETIC | CLUTTER_EVENT_FLAG_INPUT_METHOD) != 0) + if ((event->flags & + (CLUTTER_EVENT_FLAG_SYNTHETIC | CLUTTER_EVENT_FLAG_INPUT_METHOD)) != 0) return; /* If we get a key event but still have pending modifier state