From 7d487b031412fddda78745b9685e833e75878573 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 23 Oct 2011 18:33:21 +0100 Subject: [PATCH] remove unused get_mod_mask from i3-config-wizard/xcb.{c,h} --- i3-config-wizard/xcb.c | 33 --------------------------------- i3-config-wizard/xcb.h | 1 - 2 files changed, 34 deletions(-) diff --git a/i3-config-wizard/xcb.c b/i3-config-wizard/xcb.c index e5fdee92..4f8eb4da 100644 --- a/i3-config-wizard/xcb.c +++ b/i3-config-wizard/xcb.c @@ -24,39 +24,6 @@ extern xcb_window_t root; unsigned int xcb_numlock_mask; -/* - * Returns the mask for Mode_switch (to be used for looking up keysymbols by - * keycode). - * - */ -uint32_t get_mod_mask(xcb_connection_t *conn, uint32_t keycode) { - xcb_key_symbols_t *symbols = xcb_key_symbols_alloc(conn); - - xcb_get_modifier_mapping_reply_t *modmap_r; - xcb_keycode_t *modmap, kc; - xcb_keycode_t *modeswitchcodes = xcb_key_symbols_get_keycode(symbols, keycode); - if (modeswitchcodes == NULL) - return 0; - - modmap_r = xcb_get_modifier_mapping_reply(conn, xcb_get_modifier_mapping(conn), NULL); - modmap = xcb_get_modifier_mapping_keycodes(modmap_r); - - for (int i = 0; i < 8; i++) - for (int j = 0; j < modmap_r->keycodes_per_modifier; j++) { - kc = modmap[i * modmap_r->keycodes_per_modifier + j]; - for (xcb_keycode_t *ktest = modeswitchcodes; *ktest; ktest++) { - if (*ktest != kc) - continue; - - free(modeswitchcodes); - free(modmap_r); - return (1 << i); - } - } - - return 0; -} - /* * Opens the window we use for input/output and maps it * diff --git a/i3-config-wizard/xcb.h b/i3-config-wizard/xcb.h index f0416aae..c2ecedf8 100644 --- a/i3-config-wizard/xcb.h +++ b/i3-config-wizard/xcb.h @@ -10,7 +10,6 @@ extern unsigned int xcb_numlock_mask; -uint32_t get_mod_mask(xcb_connection_t *conn, uint32_t keycode); xcb_window_t open_input_window(xcb_connection_t *conn, uint32_t width, uint32_t height); int get_font_id(xcb_connection_t *conn, char *pattern, int *font_height); /**