[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: [Panel-devel] Tray icons not appearing
From: Lubos Lunak <l.lunak () suse ! cz>
Date: 2007-11-23 14:52:42
Message-ID: 200711231552.42884.l.lunak () suse ! cz
[Download RAW message or body]
On Friday 23 of November 2007, Aaron J. Seigo wrote:
> On Thursday 22 November 2007, Jason Stubbs wrote:
> > Anybody care to puzzle this one out?
The difference in the attached patch is
that "KUniqueApplication(checkComposite() ? dpy : dpy, visual ?
Qt::HANDLE(visual) : 0, colormap ? Qt::HANDLE(colormap) : 0)" is broken code.
Order of evaluating arguments for a function is not defined, so here first
2nd and 3rd one are evaluated and only then checkComposite() is called ->
Plasma runs without ARGB visuals in such case.
> evidently something about setting an argb visual on the app is screwing up
> the system tray. this is Not Good and hopefully isn't generic to QXEmbed.
Wrong :(. Unfortunately it isn't generic to QXEmbed. It is Yet Another case
of things breaking because of hacked-in ARGB visuals.
From manpage for XReparentWindow() : "A BadMatch error results if: ... The
specified window has a ParentRelative background, and the new parent window
is not the same depth as the specified window." For those untouched by Xlib:
- XEmbed uses XReparentWindow() for embedding
- Other apps usually use windows with normal default depth for systray icons,
not ARGB visuals, which are used by everything in Plasma
- Background set to ParentRelative achieves making systray icons use the same
background like the systray.
(This problem is not caught because currently the only error handling in
SystemTrayWidget is a TODO note and because there are some rather pitiful
pieces of code in QX11EmbedContainer, for example broken error handling :(.
TT will get a long patch when I get to going through it.)
The attached is an ugly workaround for it. I'm not sure if there is a good
way of handling it. Depends also on whether Qt::transparent not working
QX11EmbedContainer is just a consequence of this problem or whether it's
unrelated.
--
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: l.lunak@suse.cz , l.lunak@kde.org
Lihovarska 1060/12 tel: +420 284 028 972
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http//www.suse.cz
["systemtraywidget.cpp.patch" (text/x-diff)]
--- systemtraywidget.cpp.sav 2007-10-18 15:12:11.000000000 +0200
+++ systemtraywidget.cpp 2007-11-23 15:39:05.000000000 +0100
@@ -109,6 +109,8 @@ void SystemTrayWidget::embedWindow(WId i
kDebug() << "trying to add window with id " << id;
if (! m_containers.contains(id)) {
QX11EmbedContainer *container = new QX11EmbedContainer(this);
+ // TODO HACK: Reparenting of windows with ParentRelative backgrouns fails with different depths.
+ XSetWindowBackgroundPixmap( QX11Info::display(), id, None );
container->embedClient(id);
// TODO: add error handling
m_layout->addWidget(container);
_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic