KDE/kdebase/workspace/plasma/applets/systemtray

Jason Stubbs jasonbstubbs at gmail.com
Thu Aug 7 15:04:51 CEST 2008


SVN commit 843619 by jstubbs:

Revert to Qt-4.4.0 behaviour so that the SystemTrayWidget is always on top.
This needs to be backported to the 4.1 branch.

BUG: 168007
CCMAIL: plasma-devel at kde.org


 M  +14 -0     systemtray.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/systemtray/systemtray.cpp #843618:843619
@@ -24,6 +24,7 @@
 #include "systemtray.h"
 
 // Qt
+#include <QApplication>
 #include <QGraphicsView>
 #include <QTimer>
 
@@ -37,6 +38,19 @@
       m_startUpDelayShowTimer(0),
       m_showOwnBackground(false)
 {
+    // Revert to Qt-4.4.0 behaviour so that the SystemTrayWidget is always on
+    // top. Note, if a sibling widget requires a native window for other
+    // reasons the problem could reoccur.
+    // Another alternative is to raise() during SystemTrayWidget construction
+    // and then have it listen for ChildAdded events on its parent. However,
+    // this causes a lot of flashes of white and so should be avoided if
+    // possible.
+    // See http://bugs.kde.org/show_bug.cgi?id=168007
+    // and http://mail.kde.org/pipermail/plasma-devel/2008-August/000258.html
+    if (!QApplication::testAttribute(Qt::AA_DontCreateNativeWidgetSiblings)) {
+        QApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
+    }
+
     m_background = new Plasma::PanelSvg(this);
     m_background->setImagePath("widgets/systemtray");
 }


More information about the Plasma-devel mailing list