keyboard: Gobble up key events whenever we have a focused surface

If we have a focused surface, we need to eat up key events, not
just if we have a non-empty focus resource list. The latter would
happen if we have a focused client but it never called get_keyboard.
This commit is contained in:
Jasper St. Pierre 2014-04-17 16:33:34 -04:00
parent 0dd27edb91
commit 30ecd7c770

View File

@ -232,11 +232,10 @@ default_grab_key (MetaWaylandKeyboardGrab *grab,
{
wl_keyboard_send_key (resource, serial, time, key, state);
}
return TRUE;
}
return FALSE;
/* Eat the key events if we have a focused surface. */
return (keyboard->focus_surface != NULL);
}
static void