Index: kdeui/qxembed.cpp =================================================================== RCS file: /home/kde/kdelibs/kdeui/qxembed.cpp,v retrieving revision 1.30 diff -u -3 -p -r1.30 qxembed.cpp --- kdeui/qxembed.cpp 2002/07/17 18:02:39 1.30 +++ kdeui/qxembed.cpp 2002/07/21 21:03:23 @@ -599,6 +599,9 @@ void QXEmbed::focusInEvent( QFocusEvent void QXEmbed::focusOutEvent( QFocusEvent * ){ if (!window) return; + XFocusInEvent outev = { XFocusOut, 0, TRUE, qt_xdisplay(), window, + NotifyNormal, NotifyPointer }; + XSendEvent(qt_xdisplay(), window, TRUE, FocusChangeMask, (XEvent*) &outev); send_xembed_message( window, XEMBED_FOCUS_OUT ); } @@ -745,12 +748,15 @@ bool QXEmbed::x11Event( XEvent* e) embed( window ); } break; - case ButtonPress: + case ButtonPress: { + XFocusInEvent inev = { XFocusIn, 0, TRUE, qt_xdisplay(), e->xbutton.subwindow, NotifyNormal, NotifyPointer }; + XSendEvent(qt_xdisplay(), e->xbutton.subwindow, TRUE, FocusChangeMask, (XEvent*) &inev); QFocusEvent::setReason( QFocusEvent::Mouse ); setFocus(); QFocusEvent::resetReason(); XAllowEvents(qt_xdisplay(), ReplayPointer, CurrentTime); return TRUE; + } case ButtonRelease: XAllowEvents(qt_xdisplay(), SyncPointer, CurrentTime); break;