Bug 69119 - system tray XEMBED QXEmbed::initialize
Summary: system tray XEMBED QXEmbed::initialize
Status: RESOLVED FIXED
Alias: None
Product: klipper
Classification: Applications
Component: general (show other bugs)
Version: CVS
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Esben Mose Hansen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-27 05:35 UTC by Leon Bottou
Modified: 2005-02-04 22:36 UTC (History)
1 user (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 Leon Bottou 2003-11-27 05:35:47 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:          Linux

System tray applications are embedded 
using freedesktop.org's XEMBED protocol.
To support this Qt applications should 
call QXEmbed::initialize().

This is what KSystemTray does ( kdecore/kdeui ).
Klipper does not.

Suggested fix:
Add the following lines in kdebase/klipper/main.cpp.
These lines are copied from kdecore/kdeui/ksystemtray.cpp.

// New header.
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
#include <qxembed.h> // schroder
#endif

// In function main() before KWin::setSystemTrayWindowFor
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
    QXEmbed::initialize();
#endif

On the other hand, this call might be 
best placed inside KWin::setSystemTrayWindowFor().

- L.
Comment 1 Oded Arbel 2003-12-28 18:46:03 UTC
Will this affect the Kicker applet Klipper or the "System Tray" Klipper ? 
Can we have both modes support FreeDesktop standards (basicly so I can use Klipper in GNOME) ?
Comment 2 Leon Bottou 2003-12-29 16:46:53 UTC
This affects only the "system tray" klipper.
Comment 3 Leon Bottou 2004-05-10 18:27:22 UTC
Still an issue as of KDE-3.2.2.
Comment 4 Esben Mose Hansen 2005-02-04 22:36:23 UTC
CVS commit by esben: 

Make Klipper use freedesktop.org's XEMBED protocol.

BUG: 69119


  M +11 -0     main.cpp   1.41


--- kdebase/klipper/main.cpp  #1.40:1.41
@@ -31,4 +31,9 @@
 #include "version.h"
 
+#if defined Q_WS_X11 && ! defined K_WS_QTONLY
+#include <qxembed.h> // schroder
+#endif
+
+
 extern "C" int KDE_EXPORT kdemain(int argc, char *argv[])
 {
@@ -46,4 +51,10 @@ extern "C" int KDE_EXPORT kdemain(int ar
   Klipper *toplevel = new Klipper();
 
+  // Make Klipper conform to freedesktop system tray standard, see
+  // http://bugs.kde.org/show_bug.cgi?id=69119
+#if defined Q_WS_X11 && ! defined K_WS_QTONLY
+  QXEmbed::initialize();
+#endif
+
   KWin::setSystemTrayWindowFor( toplevel->winId(), 0 );
   toplevel->setGeometry(-100, -100, 42, 42 );