From e418ae8c0224d4de18c27444a52ffb1cf37d470e Mon Sep 17 00:00:00 2001 From: vurtun Date: Thu, 14 Apr 2016 21:01:38 +0200 Subject: [PATCH] Put unicode text input back into xlib demo --- demo/x11/main.c | 1 - demo/x11/nuklear_xlib.c | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/demo/x11/main.c b/demo/x11/main.c index 7f50f6e0..df39b1a0 100644 --- a/demo/x11/main.c +++ b/demo/x11/main.c @@ -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; diff --git a/demo/x11/nuklear_xlib.c b/demo/x11/nuklear_xlib.c index 18d5e04c..da7ed642 100644 --- a/demo/x11/nuklear_xlib.c +++ b/demo/x11/nuklear_xlib.c @@ -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);