Handle IME input
Thanks to nzl <uruabi@gmail.com> for the patch!
This commit is contained in:
parent
4c8974afef
commit
82c317ac48
@ -552,7 +552,7 @@ run(void)
|
|||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
|
||||||
while (!XNextEvent(dpy, &ev)) {
|
while (!XNextEvent(dpy, &ev)) {
|
||||||
if (XFilterEvent(&ev, win))
|
if (XFilterEvent(&ev, None))
|
||||||
continue;
|
continue;
|
||||||
switch(ev.type) {
|
switch(ev.type) {
|
||||||
case Expose:
|
case Expose:
|
||||||
@ -664,6 +664,7 @@ setup(void)
|
|||||||
XNClientWindow, win, XNFocusWindow, win, NULL);
|
XNClientWindow, win, XNFocusWindow, win, NULL);
|
||||||
|
|
||||||
XMapRaised(dpy, win);
|
XMapRaised(dpy, win);
|
||||||
|
XSetInputFocus(dpy, win, RevertToParent, CurrentTime);
|
||||||
if (embed) {
|
if (embed) {
|
||||||
XSelectInput(dpy, parentwin, FocusChangeMask);
|
XSelectInput(dpy, parentwin, FocusChangeMask);
|
||||||
if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) {
|
if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) {
|
||||||
@ -729,6 +730,8 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|
||||||
fputs("warning: no locale support\n", stderr);
|
fputs("warning: no locale support\n", stderr);
|
||||||
|
if (!XSetLocaleModifiers(""))
|
||||||
|
fputs("warning: no locale modifiers support\n", stderr);
|
||||||
if (!(dpy = XOpenDisplay(NULL)))
|
if (!(dpy = XOpenDisplay(NULL)))
|
||||||
die("cannot open display");
|
die("cannot open display");
|
||||||
screen = DefaultScreen(dpy);
|
screen = DefaultScreen(dpy);
|
||||||
|
Loading…
Reference in New Issue
Block a user