winex11.drv: Clients should pass only KeyPress events to XmbLookupString.
This commit is contained in:
parent
89faee0194
commit
ac3646cc08
|
@ -1124,7 +1124,8 @@ static WORD EVENT_event_to_vkey( XIC xic, XKeyEvent *e)
|
||||||
Status status;
|
Status status;
|
||||||
char buf[24];
|
char buf[24];
|
||||||
|
|
||||||
if (xic)
|
/* Clients should pass only KeyPress events to XmbLookupString */
|
||||||
|
if (xic && e->type == KeyPress)
|
||||||
XmbLookupString(xic, e, buf, sizeof(buf), &keysym, &status);
|
XmbLookupString(xic, e, buf, sizeof(buf), &keysym, &status);
|
||||||
else
|
else
|
||||||
XLookupString(e, buf, sizeof(buf), &keysym, NULL);
|
XLookupString(e, buf, sizeof(buf), &keysym, NULL);
|
||||||
|
@ -1365,7 +1366,8 @@ void X11DRV_KeyEvent( HWND hwnd, XEvent *xev )
|
||||||
event->type, event->window, event->state, event->keycode);
|
event->type, event->window, event->state, event->keycode);
|
||||||
|
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
if (xic)
|
/* Clients should pass only KeyPress events to XmbLookupString */
|
||||||
|
if (xic && event->type == KeyPress)
|
||||||
ascii_chars = XmbLookupString(xic, event, Str, sizeof(Str), &keysym, &status);
|
ascii_chars = XmbLookupString(xic, event, Str, sizeof(Str), &keysym, &status);
|
||||||
else
|
else
|
||||||
ascii_chars = XLookupString(event, Str, sizeof(Str), &keysym, NULL);
|
ascii_chars = XLookupString(event, Str, sizeof(Str), &keysym, NULL);
|
||||||
|
@ -2486,6 +2488,9 @@ INT X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, LPBYTE lpKeyState,
|
||||||
TRACE_(key)("type %d, window %lx, state 0x%04x, keycode 0x%04x\n",
|
TRACE_(key)("type %d, window %lx, state 0x%04x, keycode 0x%04x\n",
|
||||||
e.type, e.window, e.state, e.keycode);
|
e.type, e.window, e.state, e.keycode);
|
||||||
|
|
||||||
|
/* Clients should pass only KeyPress events to XmbLookupString,
|
||||||
|
* e.type was set to KeyPress above.
|
||||||
|
*/
|
||||||
if (xic)
|
if (xic)
|
||||||
ret = XmbLookupString(xic, &e, lpChar, sizeof(lpChar), &keysym, &status);
|
ret = XmbLookupString(xic, &e, lpChar, sizeof(lpChar), &keysym, &status);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue