KDE/kdebase/workspace/plasma/applets/systemtray

Jason Stubbs jasonbstubbs at gmail.com
Tue Aug 5 15:57:29 CEST 2008


SVN commit 842541 by jstubbs:

Make sure that the widget is on top after being created. raise() isn't
working for some reason, so this is a hack on top of a hack. ;)
Note, the system tray still isn't visible during panel configuration.
Thanks to Matthias Kretz for digging through subversion changes.

CCBUG: 168007
CC: plasma-devel at kde.org

More details to come in a reply to this on panel-devel@


 M  +11 -0     systemtraywidget.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/systemtray/systemtraywidget.cpp #842540:842541
@@ -52,6 +52,17 @@
     // Override spacing set by the current style
     m_mainLayout->setContentsMargins(0, 0, 0, 0);
     m_mainLayout->setSpacing(4);
+
+    // Widgets added to the parent before this one may end up
+    // on top of this one if their native windows are created
+    // after this one, so raise() to make sure this widget is
+    // on top.
+    // raise() -- doesn't work for some reason
+    foreach (QObject *sibling, parent->children()) {
+        if (sibling != this && sibling->isWidgetType()) {
+            static_cast<QWidget*>(sibling)->lower();
+        }
+    }
 }
 
 void SystemTrayWidget::init()


More information about the Plasma-devel mailing list