[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    [Panel-devel] Tray icons not appearing
From:       Jason Stubbs <jasonbstubbs () gmail ! com>
Date:       2007-11-23 3:51:13
Message-ID: 200711231251.13765.jasonbstubbs () gmail ! com
[Download RAW message or body]

I'm utterly confused so I'm going to throw this problem out there for somebody 
more knowledgeable than me to solve. ;)

I isolated the system tray icons disappearing to this patch:
http://websvn.kde.org/?view=rev&revision=738093

I then did a merge -r 738093:738092 against head and changed code back line by 
line to how it is currently until the icons disappeared again. The remaining 
changes are attached.

Note that the only real change there is that checkComposite() is being called 
after PlasmaApp begins constructing, as far as I can see. Why this could have 
any affect on system tray icons appearing? I don't know.

Anybody care to puzzle this one out?

-- 
Jason Stubbs

["plasmaapp-revert.patch" (text/x-diff)]

Index: plasmaapp.cpp
===================================================================
--- plasmaapp.cpp	(revision 738849)
+++ plasmaapp.cpp	(working copy)
@@ -50,12 +50,12 @@
 Colormap colormap = 0;
 Visual *visual = 0;
 
-void checkComposite()
+bool checkComposite()
 {
     dpy = XOpenDisplay(0); // open default display
     if (!dpy) {
         kError() << "Cannot connect to the X server" << endl;
-        return;
+        return false;
     }
 
     int screen = DefaultScreen(dpy);
@@ -83,20 +83,19 @@
     kDebug() << (colormap ? "Plasma has an argb visual" : "Plasma lacks an argb \
                visual") << visual << colormap;
     kDebug() << ((KWindowSystem::compositingActive() && colormap) ? "Plasma can use \
                COMPOSITE for effects"
                                                                     : "Plasma is \
COMPOSITE-less") << "on" << dpy; +    return true;
 }
 
 PlasmaApp* PlasmaApp::self()
 {
     if (!kapp) {
-        checkComposite();
-        return new PlasmaApp(dpy, visual ? Qt::HANDLE(visual) : 0, colormap ? \
Qt::HANDLE(colormap) : 0); +        return new PlasmaApp();
     }
-
     return qobject_cast<PlasmaApp*>(kapp);
 }
 
-PlasmaApp::PlasmaApp(Display* display, Qt::HANDLE visual, Qt::HANDLE colormap)
-    : KUniqueApplication(display, visual, colormap),
+PlasmaApp::PlasmaApp()
+    : KUniqueApplication(checkComposite() ? dpy : dpy, visual ? Qt::HANDLE(visual) : \
0, colormap ? Qt::HANDLE(colormap) : 0),  m_root(0),
       m_corona(0)
 {
Index: plasmaapp.h
===================================================================
--- plasmaapp.h	(revision 738849)
+++ plasmaapp.h	(working copy)
@@ -54,7 +54,7 @@
     void setCrashHandler();
 
 private:
-    PlasmaApp(Display* display, Qt::HANDLE visual, Qt::HANDLE colormap);
+    PlasmaApp();
     static void crashHandler(int signal);
     void createPanels();
 



_______________________________________________
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