Bug 326043 - Oxygen-Transparent breaks kpartsplugin embedding (a.k.a. xembed)
Summary: Oxygen-Transparent breaks kpartsplugin embedding (a.k.a. xembed)
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Unclassified
Component: style (show other bugs)
Version: unspecified
Platform: Archlinux Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-15 10:28 UTC by Yichao Yu
Modified: 2016-06-10 07:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yichao Yu 2013-10-15 10:28:48 UTC
I have noticed that oxygen transparent has a bug that I have recently fixed[1] in QtCurve. Setting WA_TranslucentBackground can cause Qt to recreate the window and this breaks the XEmbed protocol. Please test for the _XEMBED_INFO property on the window before doing that.

[1] https://github.com/QtCurve/qtcurve/commit/f9b69e08ef26e734b2790cf6a4a96a5036c52838


Reproducible: Always
Comment 1 Yichao Yu 2013-10-15 10:31:32 UTC
P.S. this only affect Qt4 version since the Qt5 never recreate the window (for now).
Comment 2 Hugo Pereira Da Costa 2013-10-15 13:03:12 UTC
Hi, thanks for the report and patch (!)
I'll implement asap and close this bug.
(will need some work, I have changes to oxygen to be merged in transparent first.
Hugo
Comment 3 Hugo Pereira Da Costa 2013-10-17 09:55:34 UTC
Do you have an application on which I can test that the patch works ?
Comment 4 Yichao Yu 2013-10-17 10:01:03 UTC
Application? You mean kpartsplugin? Install kpartsplugin and try to open a pdf in a browser I guess?
Comment 5 Yichao Yu 2013-10-17 10:04:56 UTC
It's the same bug mentioned on this page[1] (now) with title "Additions to blacklist".

[1] http://kde-look.org/content/show.php?content=127752&forumpage=29
Comment 6 Hugo Pereira Da Costa 2013-10-17 10:48:40 UTC
Thanks !
Now I am confused: my first implementation of the patch is not working (no big deal so far)
its different from yours because I'm not using xcb yet to access properties. (will do, but for Qt5/KF5). 
But then, using xprop, I never seem to be able to get the _XEMBED_INFO property either on any window. Any idea on when/where/how I can check whether the property is set or not ?
Comment 7 Yichao Yu 2013-10-17 10:55:37 UTC
I am not sure how xprop determines which window it gets info from but it it doesn't seem to be the smallest / highest level one under the cursor.
I think what I did was to
1. print window id in the code and use `xprop -id [winid]`
2. use `xwininfo -tree` (I think you can figure out which window it is from the title easily) and find the right window then use `xprop -id`
Note that all of these need to be done without translucent background enabled otherwise the window will be destroyed.

P.S. specification here http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html
Comment 8 Hugo Pereira Da Costa 2013-10-17 10:56:40 UTC
Thanks again, very helpfull :)
Maybe you might want consider helping on oxygen-transparent development ;)

Will keep you posted
Comment 9 Hugo Pereira Da Costa 2013-10-18 10:55:06 UTC
Git commit 0393469d71eb1d49d4bf06c3ef4c112219e5e947 by Hugo Pereira Da Costa.
Committed on 17/10/2013 at 15:07.
Pushed by hpereiradacosta into branch 'KDE/4.11'.

do not set transparency on windows that have _XEMBED_INFO property set.

M  +43   -1    style/oxygenargbhelper.cpp
M  +15   -0    style/oxygenargbhelper.h

http://commits.kde.org/oxygen-transparent/0393469d71eb1d49d4bf06c3ef4c112219e5e947
Comment 10 Ruslan Kabatsayev 2016-06-10 07:43:58 UTC
> P.S. this only affect Qt4 version since the Qt5 never recreate the window (for now).
Actually it does recreate window on screen change. What's more problematic with Qt5 is that it seems that all toplevel windows have _XEMBED_INFO property set, so it'll be hard to detect kpartsplugin this way.