aboutsummaryrefslogtreecommitdiffstats
path: root/pugl
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-09-14 23:01:34 +0800
committerDavid Robillard <d@drobilla.net>2016-09-14 23:01:34 +0800
commitd394a51b662a3cbbb575a94836a6d9737ce0c26a (patch)
treec32e18b599783dff76a08074a90bfeb8f668859f /pugl
parentc86a7f10621d8f5f6f2a89f801ca25560ecc9fff (diff)
downloadpugl-d394a51b662a3cbbb575a94836a6d9737ce0c26a.tar.gz
pugl-d394a51b662a3cbbb575a94836a6d9737ce0c26a.tar.bz2
pugl-d394a51b662a3cbbb575a94836a6d9737ce0c26a.zip
Fix compose key
Turns out the app needs to call setlocale(LC_ALL, "") for this to work. I am not sure if it is possible to make things work correctly purely in Pugl (since plugin UIs can't call setlocale).
Diffstat (limited to 'pugl')
-rw-r--r--pugl/pugl_x11.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pugl/pugl_x11.c b/pugl/pugl_x11.c
index 855d04b..7ceef29 100644
--- a/pugl/pugl_x11.c
+++ b/pugl/pugl_x11.c
@@ -323,6 +323,7 @@ puglCreateWindow(PuglView* view, const char* title)
(Window)(view->transient_parent));
}
+ XSetLocaleModifiers("");
if (!(impl->xim = XOpenIM(impl->display, NULL, NULL, NULL))) {
XSetLocaleModifiers("@im=");
if (!(impl->xim = XOpenIM(impl->display, NULL, NULL, NULL))) {
@@ -330,10 +331,11 @@ puglCreateWindow(PuglView* view, const char* title)
}
}
- if (!(impl->xic = XCreateIC(impl->xim, XNInputStyle,
- XIMPreeditNothing | XIMStatusNothing,
+ const XIMStyle im_style = XIMPreeditNothing | XIMStatusNothing;
+ if (!(impl->xic = XCreateIC(impl->xim,
+ XNInputStyle, im_style,
XNClientWindow, impl->win,
- XNFocusWindow, impl->win,
+ XNFocusWindow, impl->win,
NULL))) {
fprintf(stderr, "warning: XCreateIC failed\n");
}