summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2021-08-31 22:03:03 +0300
committerRan Benita <ran@unusedvar.com>2021-08-31 22:03:03 +0300
commit4e361712d2ccd9fae30972c97ad290dc238e9913 (patch)
tree032cfb8e3c0eafbc437ef5a772f31184f5af3087 /src
parentf8c430cf7157bb45aeeb3dacce69730bad3052a4 (diff)
downloadlibxkbcommon-4e361712d2ccd9fae30972c97ad290dc238e9913.tar.gz
libxkbcommon-4e361712d2ccd9fae30972c97ad290dc238e9913.tar.bz2
libxkbcommon-4e361712d2ccd9fae30972c97ad290dc238e9913.zip
x11: stylistic fixes
Signed-off-by: Ran Benita <ran@unusedvar.com>
Diffstat (limited to 'src')
-rw-r--r--src/x11/keymap.c14
-rw-r--r--src/x11/util.c3
2 files changed, 9 insertions, 8 deletions
diff --git a/src/x11/keymap.c b/src/x11/keymap.c
index df150d1..774ccdf 100644
--- a/src/x11/keymap.c
+++ b/src/x11/keymap.c
@@ -1160,27 +1160,27 @@ xkb_x11_keymap_new_from_device(struct xkb_context *ctx,
struct x11_atom_interner interner;
x11_atom_interner_init(&interner, ctx, conn);
- xcb_xkb_get_map_cookie_t get_map_cookie =
+ xcb_xkb_get_map_cookie_t map_cookie =
xcb_xkb_get_map(conn, device_id, get_map_required_components,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
xcb_xkb_get_indicator_map_cookie_t indicator_map_cookie =
xcb_xkb_get_indicator_map(conn, device_id, ALL_INDICATORS_MASK);
xcb_xkb_get_compat_map_cookie_t compat_map_cookie =
xcb_xkb_get_compat_map(conn, device_id, 0, true, 0, 0);
- xcb_xkb_get_names_cookie_t get_names_cookie =
+ xcb_xkb_get_names_cookie_t names_cookie =
xcb_xkb_get_names(conn, device_id, get_names_wanted);
- xcb_xkb_get_controls_cookie_t get_controls_cookie =
+ xcb_xkb_get_controls_cookie_t controls_cookie =
xcb_xkb_get_controls(conn, device_id);
bool had_error = false;
- had_error |= !get_map(keymap, conn, get_map_cookie);
+ had_error |= !get_map(keymap, conn, map_cookie);
had_error |= !get_indicator_map(keymap, conn, indicator_map_cookie);
had_error |= !get_compat_map(keymap, conn, compat_map_cookie);
- had_error |= !get_names(keymap, &interner, get_names_cookie);
- had_error |= !get_controls(keymap, conn, get_controls_cookie);
-
+ had_error |= !get_names(keymap, &interner, names_cookie);
+ had_error |= !get_controls(keymap, conn, controls_cookie);
x11_atom_interner_round_trip(&interner);
had_error |= interner.had_error;
+
if (had_error) {
xkb_keymap_unref(keymap);
return NULL;
diff --git a/src/x11/util.c b/src/x11/util.c
index 2ea92a2..cc4c71c 100644
--- a/src/x11/util.c
+++ b/src/x11/util.c
@@ -215,7 +215,8 @@ retry:
interner->pending[idx].cookie = xcb_get_atom_name(interner->conn, atom);
}
-void x11_atom_interner_round_trip(struct x11_atom_interner *interner) {
+void
+x11_atom_interner_round_trip(struct x11_atom_interner *interner) {
struct xkb_context *ctx = interner->ctx;
xcb_connection_t *conn = interner->conn;