[Kwin] Re: Embedding multible java applets and focus problems

Leon Bottou leon at bottou.org
Mon Oct 13 21:35:21 BST 2003


On Monday 13 October 2003 03:59 pm, Koos Vriezen wrote:
> On Mon, 13 Oct 2003, Leon Bottou wrote:
> > 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.
>
> Makes sense, if one kills konqueror or a crash, seeing all those floating
> plugins isn't that nice. However it is a change with current
> behaviour...otoh this is an exceptional case..or are there apps freeing
> an embed app by killing the host :) out there?

As it is now, the XAddToSaveSet is only performed 
when the embedding is achieved by calling embed().  
Not when using QXEmbed::embedClientIntoWindow().   
Nobody noticed...

By the way your patch says
+    if (!d->autoDelete)
+        XAddToSaveSet( qt_xdisplay(), w );

It should be the other way around:
+    if (d->autoDelete)
+        XAddToSaveSet( qt_xdisplay(), w );

setAutoDelete(true) causes the QXEmbed destructor to properly unmap 
the window and send the WM_DELETE_WINDOW message.  This is the default.
You'd get the behavior you want by saying setAutoDelete(false)...

The attached patch is a compilation of everything discussed in this thread,
including the change to reduce the blinking effect, the move of the
second part of the embed() code into the ReparentNotify section of
x11_event, and some additional comments...

It compiles.  It needs testing.

- L.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: qxembed.cpp.diff
Type: text/x-diff
Size: 6639 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20031013/0aa67e64/attachment.diff>


More information about the kfm-devel mailing list