Bug 225187 - QX11EmbedContainer receives ReparentNotify twice
Summary: QX11EmbedContainer receives ReparentNotify twice
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-01 20:42 UTC by Christian Ehrlicher
Modified: 2016-10-30 07:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Testcase (2.10 KB, application/force-download)
2010-02-01 20:43 UTC, Christian Ehrlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ehrlicher 2010-02-01 20:42:19 UTC
Version:            (using KDE 4.3.4)
OS:                Linux
Installed from:    openSUSE RPMs

I can't embed a QX11EmbedWidget into an QX11EmbedContainer. See attached testcase. Doing it the other way round (passing the winId of the widget to the container) works well.
I tried it with another windowmanager (icewm) and it works fine:

QX11EmbedContainer::QX11EmbedContainer: constructed container 0x7fff0f0e3a70 with winId 16777218 
wid: 16777218
Event: 28
Event: 28
Event: 28
Event: 19
Event: 22
Event: 22
Event: 21
QX11EmbedContainer::x11Event: server 0x7fff0f0e3a70 with winId 16777218 received a ReparentNotify to 16777218   0   10487669   16777218 
Event: 19
Event: 12
Event: 9
Event: 33
Event: 10
Event: 21
QX11EmbedContainer::x11Event: server 0x7fff0f0e3a70 with winId 16777218 received a ReparentNotify to 23068674   0   16777218   16777218 
void MyQX11EmbedContainer::onClientIsEmbedded()

and here the same with kwin:
QX11EmbedContainer::QX11EmbedContainer: constructed container 0x7fffa0a511b0 with winId 73400322 
wid: 73400322
Event: 28
Event: 28
Event: 28
Event: 19
Event: 22
Event: 22
Event: 21
QX11EmbedContainer::x11Event: server 0x7fffa0a511b0 with winId 73400322 received a ReparentNotify to 73400322   0   23080861   73400322 
Event: 19
Event: 12
Event: 12
Event: 12
Event: 33
Event: 9
Event: 33
Event: 7
Event: 6
Event: 6
Event: 8
Event: 10
Event: 21
QX11EmbedContainer::x11Event: server 0x7fffa0a511b0 with winId 73400322 received a ReparentNotify to 75497474   0   73400322   73400322 
void MyQX11EmbedContainer::onClientIsEmbedded()
Event: 21
QX11EmbedContainer::x11Event: server 0x7fffa0a511b0 with winId 73400322 received a ReparentNotify to 75497474   75497474   23082331   73400322 
void MyQX11EmbedContainer::onClientClosed()


I would fix it by myself but don't know where to start. Looking into the kwin sources didn't help :)
Comment 1 Christian Ehrlicher 2010-02-01 20:43:43 UTC
Created attachment 40443 [details]
Testcase
Comment 2 Martin Flöser 2012-04-08 19:15:41 UTC
I assume the problem is still present, right?
Comment 3 Thomas Lübking 2013-03-13 20:49:10 UTC
FTR, the behavior is the very same with
- openbox
- sawfish
- metacity

Compiz doesn't trigger the onClientClosed() slot but does not map the client either (ie. the client vanishes from screen but does not appear in the server)

IceWM gets me:
IceWM: Achtung: app trying to map XEmbed window 0x1800004, ignoring
IceWM: Achtung: app trying to map XEmbed window 0x1800004, ignoring

What means it detects the XEmbed'dable client and simply denies mapping (more or less treating it like override_redirect)

Also IceWM is afair not NETWM compliant.

Personally i'm tempted to set this invalid (because KWin just behaves as every other WM), but we should lookup the XEmbed protocol (ie. whether IceWM is doing it right in treating this like override-redirect; still not mapping such windows could lead to unfortunate side-effects, eg. regarding systray icons)
Comment 4 Martin Flöser 2016-10-30 07:56:55 UTC
Due to the QX11EmbedWidget being Qt 4 and thus no longer maintained I mark as invalid. There was a somewhat similar bug report for Qt 5 which turned out to be a bug in Qt itself.