Since the XKB says that support for detectable repeat is in fact optional: http://www.x.org/releases/current/doc/kbproto/xkbproto.html#Querying_and_Changing_Per_Client_Flags we might as well be good citizens and check that it was really set. With the X server this would never happen, though.
Signed-off-by: Ran Benita <ran...@gmail.com> --- src/compositor-x11.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compositor-x11.c b/src/compositor-x11.c index 001dec4..c575f25 100644 --- a/src/compositor-x11.c +++ b/src/compositor-x11.c @@ -249,9 +249,11 @@ x11_compositor_setup_xkb(struct x11_compositor *c) 0, 0); pcf_reply = xcb_xkb_per_client_flags_reply(c->conn, pcf, NULL); - if (!pcf_reply) { + if (!pcf_reply || + !(pcf_reply->value & XCB_XKB_PER_CLIENT_FLAG_DETECTABLE_AUTO_REPEAT)) { weston_log("failed to set XKB per-client flags, not using " "detectable repeat\n"); + free(pcf_reply); return; } free(pcf_reply); -- 1.8.0 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel