This fixes a regression from 22795243b2d21e1a667215f54c3a15634735749c, which calls thread_init_display() and eventually XOpenIM() before X11DRV_InitXIM() is called.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47821 Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/winex11.drv/x11drv_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 21807af3f1..c2f1fd1bbc 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -578,6 +578,8 @@ static BOOL process_attach(void)
if (TRACE_ON(synchronous)) XSynchronize( display, True );
+ if (use_xim) use_xim = X11DRV_InitXIM( input_style ); + xinerama_init( DisplayWidth( display, default_visual.screen ), DisplayHeight( display, default_visual.screen )); X11DRV_Settings_Init(); @@ -595,7 +597,6 @@ static BOOL process_attach(void) if (use_xkb) use_xkb = XkbUseExtension( gdi_display, NULL, NULL ); #endif X11DRV_InitKeyboard( gdi_display ); - if (use_xim) use_xim = X11DRV_InitXIM( input_style );
X11DRV_DisplayDevices_Init(FALSE); return TRUE;