compositor-x11: verify that detectable repeat was really set
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>
This commit is contained in:
committed by
Kristian Høgsberg
parent
6a39d8790e
commit
7109cc8b06
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user