summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tdecore/knotifyclient.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tdecore/knotifyclient.cpp b/tdecore/knotifyclient.cpp
index e07522fca..bfde017af 100644
--- a/tdecore/knotifyclient.cpp
+++ b/tdecore/knotifyclient.cpp
@@ -31,6 +31,14 @@
#include <kdebug.h>
#include <kstaticdeleter.h>
+#ifdef Q_WS_X11
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/XKBlib.h>
+#include <X11/keysym.h>
+#include <fixx11h.h>
+#endif
+
static const char daemonName[] = "knotify";
static bool canAvoidStartupEvent( const TQString& event, const TQString& appname, int present )
@@ -68,6 +76,11 @@ static int sendNotifyEvent(const TQString &message, const TQString &text,
{
if (!kapp) return 0;
+ // ensure tray icon is shown and positioned before sending event to notification daemon
+#ifdef Q_WS_X11
+ XFlush(tqt_xdisplay());
+#endif
+
DCOPClient *client=kapp->dcopClient();
if (!client->isAttached())
{