Index: qxembed.cpp =================================================================== RCS file: /home/kde/kdelibs/kdeui/qxembed.cpp,v retrieving revision 1.44 diff -u -3 -p -r1.44 qxembed.cpp --- qxembed.cpp 25 Sep 2003 18:16:54 -0000 1.44 +++ qxembed.cpp 13 Oct 2003 19:55:51 -0000 @@ -735,7 +735,8 @@ void QXEmbed::embed(WId w) kdDebug() << "************************** Embed "<< QString("0x%1").arg(w, 0, 16) << " into " << QString("0x%1").arg(winId(), 0, 16) << " window=" << QString("0x%1").arg(window, 0, 16) << " **********" << endl; if (!w) return; - XAddToSaveSet( qt_xdisplay(), w ); + if (!d->autoDelete) + XAddToSaveSet( qt_xdisplay(), w ); bool has_window = w == window; window = w; if ( !has_window ) { @@ -758,7 +759,8 @@ void QXEmbed::embed(WId w) kdDebug() << QString(">>> Loop %1: reparent of 0x%2 into 0x%3 failed").arg(i).arg(w, 0, 16).arg(winId(), 0, 16) << endl; USLEEP(1000); } - QApplication::syncX(); + //QApplication::syncX(); + return; // let ReparentNotify finish the job } XResizeWindow(qt_xdisplay(), w, width(), height()); Index: qxembed.h =================================================================== RCS file: /home/kde/kdelibs/kdeui/qxembed.h,v retrieving revision 1.21 diff -u -3 -p -r1.21 qxembed.h --- qxembed.h 21 Aug 2003 09:51:37 -0000 1.21 +++ qxembed.h 13 Oct 2003 19:55:51 -0000 @@ -176,7 +176,14 @@ public: bool eventFilter( QObject *, QEvent * ); + /** + * Default the embedded window is reparented to the root window when + * this widget gets deleted. + * Calling setAutoDelete(true), unmaps the window and + * sends a WM_DELETE_WINDOW event. + **/ void setAutoDelete( bool ); + bool autoDelete() const; bool customWhatsThis() const;