On Monday 13 October 2003 12:15 pm, you wrote: > > > One additional remark, the XAddToSaveSet call prevents the embedded > > > window to be destroyed when the parent (QXEmbed) gets destroyed. Do we > > > really want that for java/nsplugin? (protecting this call with 'if > > > (!d->xplain)' does seem to get rid of those ugly window flashes after > > > closing konq) > > > > I don't think you can do this for XEmbed mode, but AFAIK XPLAIN is not a > > real protocol, so it can do whatever it finds appropriate. > > Yes, that's why the 'if (!d->xplain)' guard. George, what do you think, > make embedding with XPLAIN always destroy the embedded window or should > we add add a QXEmbed::destroyWithParent(bool) or something member for > that? Destroying the window is not very nice. XPLAIN embedded applications, by definition, are not aware they are embedded. Granted, this is not true for the java/nsplugin viewers. Also check the QXEmbed::setAutoDelete() undocumented stuff. I changes what the QXEmbed destructor does: - When autoDelete is true, the destructor unmaps the window before reparenting it to the root. So it should not be visible. No flash. It also sends a WM_DELETE_WINDOW event to inform the embedded application that it would be safe to quit. - When autoDelete is false, none of this happen. The embedding window is destroyed and the X11 save-set thing reparents the embedded window into the root window. Maybe the save set thing should not be enabled when autoDelete is false... A brutal destruction of the embedding window would then cause a brutal destruction of the embedded window as well. - L.