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 <ran234@gmail.com>
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);