From kfm-devel Mon Oct 13 19:59:59 2003 From: Koos Vriezen Date: Mon, 13 Oct 2003 19:59:59 +0000 To: kfm-devel Subject: Re: [Kwin] Re: Embedding multible java applets and focus problems X-MARC-Message: https://marc.info/?l=kfm-devel&m=106607525519242 MIME-Version: 1 Content-Type: multipart/mixed; boundary="---1463811574-1954912505-1066075199=:1989" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---1463811574-1954912505-1066075199=:1989 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 13 Oct 2003, Leon Bottou wrote: > 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. Ah yes, that's even better (like it's already there :) > 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? Ok, updated patch attached. Koos ---1463811574-1954912505-1066075199=:1989 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="qxembed.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="qxembed.diff" SW5kZXg6IHF4ZW1iZWQuY3BwDQo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpS Q1MgZmlsZTogL2hvbWUva2RlL2tkZWxpYnMva2RldWkvcXhlbWJlZC5jcHAs dg0KcmV0cmlldmluZyByZXZpc2lvbiAxLjQ0DQpkaWZmIC11IC0zIC1wIC1y MS40NCBxeGVtYmVkLmNwcA0KLS0tIHF4ZW1iZWQuY3BwCTI1IFNlcCAyMDAz IDE4OjE2OjU0IC0wMDAwCTEuNDQNCisrKyBxeGVtYmVkLmNwcAkxMyBPY3Qg MjAwMyAxOTo1NTo1MSAtMDAwMA0KQEAgLTczNSw3ICs3MzUsOCBAQCB2b2lk IFFYRW1iZWQ6OmVtYmVkKFdJZCB3KQ0KICAgICBrZERlYnVnKCkgPDwgIioq KioqKioqKioqKioqKioqKioqKioqKioqIEVtYmVkICI8PCBRU3RyaW5nKCIw eCUxIikuYXJnKHcsIDAsIDE2KSA8PCAiIGludG8gIiA8PCBRU3RyaW5nKCIw eCUxIikuYXJnKHdpbklkKCksIDAsIDE2KSA8PCAiIHdpbmRvdz0iIDw8IFFT dHJpbmcoIjB4JTEiKS5hcmcod2luZG93LCAwLCAxNikgPDwgIiAqKioqKioq KioqIiA8PCBlbmRsOyANCiAgICAgaWYgKCF3KQ0KICAgICAgICAgcmV0dXJu Ow0KLSAgICBYQWRkVG9TYXZlU2V0KCBxdF94ZGlzcGxheSgpLCB3ICk7DQor ICAgIGlmICghZC0+YXV0b0RlbGV0ZSkNCisgICAgICAgIFhBZGRUb1NhdmVT ZXQoIHF0X3hkaXNwbGF5KCksIHcgKTsNCiAgICAgYm9vbCBoYXNfd2luZG93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N0ICosIFFFdmVudCAqICk7DQogDQorICAgIC8qKg0KKyAg ICAgKiBEZWZhdWx0IHRoZSBlbWJlZGRlZCB3aW5kb3cgaXMgcmVwYXJlbnRl ZCB0byB0aGUgcm9vdCB3aW5kb3cgd2hlbg0KKyAgICAgKiB0aGlzIHdpZGdl dCBnZXRzIGRlbGV0ZWQuDQorICAgICAqIENhbGxpbmcgc2V0QXV0b0RlbGV0 ZSh0cnVlKSwgdW5tYXBzIHRoZSB3aW5kb3cgYW5kDQorICAgICAqIHNlbmRz IGEgV01fREVMRVRFX1dJTkRPVyBldmVudC4NCisgICAgICoqLw0KICAgICB2 b2lkIHNldEF1dG9EZWxldGUoIGJvb2wgKTsNCisNCiAgICAgYm9vbCBhdXRv RGVsZXRlKCkgY29uc3Q7DQogDQogICAgIGJvb2wgY3VzdG9tV2hhdHNUaGlz KCkgY29uc3Q7DQo= ---1463811574-1954912505-1066075199=:1989--