Put unicode text input back into xlib demo
This commit is contained in:
parent
b2c87ed7c0
commit
e418ae8c02
@ -140,7 +140,6 @@ main(void)
|
||||
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
|
||||
nk_layout_row_dynamic(ctx, 22, 1);
|
||||
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
|
||||
nk_layout_row_dynamic(ctx, 100, 1);
|
||||
}
|
||||
nk_end(ctx);}
|
||||
if (nk_window_is_closed(ctx, "Demo")) break;
|
||||
|
@ -479,11 +479,9 @@ nk_xlib_handle_event(Display *dpy, int screen, Window win, XEvent *evt)
|
||||
nk_input_key(ctx, NK_KEY_TEXT_LINE_END, down);
|
||||
else if (!down) {
|
||||
char buf[32];
|
||||
if ((*code >= 'a' && *code <= 'z') || (*code >= 'A' && *code <= 'Z')) {
|
||||
KeySym keysym = 0;
|
||||
if (XLookupString((XKeyEvent*)evt, buf, 32, &keysym, NULL) != NoSymbol)
|
||||
nk_input_glyph(ctx, buf);
|
||||
}
|
||||
KeySym keysym = 0;
|
||||
if (XLookupString((XKeyEvent*)evt, buf, 32, &keysym, NULL) != NoSymbol)
|
||||
nk_input_glyph(ctx, buf);
|
||||
}
|
||||
}
|
||||
XFree(code);
|
||||
|
Loading…
Reference in New Issue
Block a user