FreeBSD Bugzilla – Attachment 168430 Details for
Bug 208069
x11-wm/i3: i3-config-wizard generates incomplete config file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[patch] Existing keysyms are translated - others are copied
patch-i3-config-wizard_main.c (text/plain), 2.02 KB, created by
c.brinkhaus
on 2016-03-20 17:34:30 UTC
(
hide
)
Description:
[patch] Existing keysyms are translated - others are copied
Filename:
MIME Type:
Creator:
c.brinkhaus
Created:
2016-03-20 17:34:30 UTC
Size:
2.02 KB
patch
obsolete
>--- i3-config-wizard/main.c.orig 2016-03-06 15:17:18 UTC >+++ i3-config-wizard/main.c >@@ -264,21 +264,29 @@ static char *next_state(const cmdp_token > const xkb_keysym_t *syms; > int num = xkb_keymap_key_get_syms_by_level(xkb_keymap, keycode, 0, 0, &syms); > if (num == 0) >- errx(1, "xkb_keymap_key_get_syms_by_level returned no symbols for keycode %d", keycode); >- if (!keysym_used_on_other_key(syms[0], keycode)) >- level = 0; >+ fprintf(stderr, "xkb_keymap_key_get_syms_by_level returned no symbols for keycode %d\n", keycode); >+ if (num != 0) >+ { >+ if (!keysym_used_on_other_key(syms[0], keycode)) >+ level = 0; >+ } > } > > const xkb_keysym_t *syms; > int num = xkb_keymap_key_get_syms_by_level(xkb_keymap, keycode, 0, level, &syms); > if (num == 0) >- errx(1, "xkb_keymap_key_get_syms_by_level returned no symbols for keycode %d", keycode); >+ fprintf(stderr, "xkb_keymap_key_get_syms_by_level returned no symbols for keycode %d\n", keycode); > if (num > 1) >- printf("xkb_keymap_key_get_syms_by_level (keycode = %d) returned %d symbolsinstead of 1, using only the first one.\n", keycode, num); >- >+ fprintf(stderr, "xkb_keymap_key_get_syms_by_level (keycode = %d) returned %d symbolsinstead of 1, using only the first one.\n", keycode, num); > char str[4096]; >- if (xkb_keysym_get_name(syms[0], str, sizeof(str)) == -1) >- errx(EXIT_FAILURE, "xkb_keysym_get_name(%u) failed", syms[0]); >+ if (num != 0) { >+ if (xkb_keysym_get_name(syms[0], str, sizeof(str)) == -1) >+ errx(EXIT_FAILURE, "xkb_keysym_get_name(%u) failed", syms[0]); >+ } >+ else >+ { >+ strcpy(str, get_string("key")); >+ } > const char *release = get_string("release"); > char *res; > char *modrep = (modifiers == NULL ? sstrdup("") : sstrdup(modifiers));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208069
:
168304
|
168306
| 168430 |
168431
|
168433