Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > cc8f970be8f3f9d917634bf75d52343e > files > 71

qt3-3.3.4-23mdk.src.rpm

--- qt/src/input/qximinputcontext_x11.cpp
+++ qt/src/input/qximinputcontext_x11.cpp
@@ -482,8 +482,11 @@ void QXIMInputContext::init_xim()
 		  ximServerName.ascii());
     else {
 	Display *dpy = QPaintDevice::x11AppDisplay();
+	XWindowAttributes attr; // XIM unselects all events on the root window
+	XGetWindowAttributes( dpy, QPaintDevice::x11AppRootWindow(), &attr );
 	XRegisterIMInstantiateCallback(dpy, 0, 0, 0,
 				       (XIMProc) xim_create_callback, 0);
+	XSelectInput( dpy, QPaintDevice::x11AppRootWindow(), attr.your_event_mask );
     }
 #else // !USE_X11R6_XIM
     else if ( XSetLocaleModifiers ("") == 0 )