winex11.drv: Wine should select event mask for input method.
Kusanagi Kouichi
slash at ma.neweb.ne.jp
Thu Apr 24 06:36:21 CDT 2008
Input method has event mask which is needed to be selected.
Client is expected to augment its own event mask with this.
---
dlls/winex11.drv/xim.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c
index 265f9c8..4bf0673 100644
--- a/dlls/winex11.drv/xim.c
+++ b/dlls/winex11.drv/xim.c
@@ -507,6 +507,8 @@ XIC X11DRV_CreateIC(XIM xim, struct x11drv_win_data *data)
XICCallback P_StartCB, P_DoneCB, P_DrawCB, P_CaretCB;
LANGID langid = PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale()));
Window win = data->whole_window;
+ XWindowAttributes attr;
+ long mask;
TRACE("xim = %p\n", xim);
@@ -617,6 +619,15 @@ XIC X11DRV_CreateIC(XIM xim, struct x11drv_win_data *data)
if (status != NULL)
XFree(status);
+ if (!XGetICValues(xic, XNFilterEvents, &mask, NULL) &&
+ XGetWindowAttributes(XDisplayOfIM(xim), win, &attr))
+ {
+ XSetWindowAttributes new_attr;
+
+ new_attr.event_mask = attr.your_event_mask | mask;
+ XChangeWindowAttributes(XDisplayOfIM(xim), win, CWEventMask, &new_attr);
+ }
+
wine_tsx11_unlock();
return xic;
--
1.5.5.1
More information about the wine-patches
mailing list