SOURCES: kdelibs-xgl.patch (NEW) http://ubuntuforums.org/showpost....

wolf wolf at pld-linux.org
Tue Feb 21 04:11:33 CET 2006


Author: wolf                         Date: Tue Feb 21 03:11:33 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
http://ubuntuforums.org/showpost.php?p=746983&postcount=229

---- Files affected:
SOURCES:
   kdelibs-xgl.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/kdelibs-xgl.patch
diff -u /dev/null SOURCES/kdelibs-xgl.patch:1.1
--- /dev/null	Tue Feb 21 04:11:33 2006
+++ SOURCES/kdelibs-xgl.patch	Tue Feb 21 04:11:27 2006
@@ -0,0 +1,63 @@
+--- kdelibs-3.5.1/kdeui/ksystemtray.cpp	2005-10-10 11:06:38.000000000 -0400
++++ kdelibs-3.5.1-patched/kdeui/ksystemtray.cpp	2006-02-18 11:52:01.000000000 -0500
+@@ -32,6 +32,7 @@
+ #include <kwin.h> 
+ #include <kwinmodule.h> 
+ #include <qxembed.h> 
++#include <X11/Xlib.h>
+ #endif
+ 
+ #include <kiconloader.h>
+@@ -39,6 +40,8 @@
+ 
+ #include <qapplication.h>
+ 
++extern Time qt_x_time;
++
+ class KSystemTrayPrivate
+ {
+ public:
+@@ -63,6 +66,43 @@
+     QXEmbed::initialize();
+ #endif
+     
++    {
++	    XGrabServer (qt_xdisplay());
++	    static Atom selection =  XInternAtom( qt_xdisplay(), "_NET_SYSTEM_TRAY_S" + QCString().setNum( qt_xscreen()), False );
++    
++	    /* look for the system tray window */
++	    Window tray = XGetSelectionOwner (qt_xdisplay(), selection);
++
++	    if (tray != None)
++	    {
++	    	    /* found it */
++	    	    XSelectInput (qt_xdisplay(), tray, StructureNotifyMask);
++	    }
++
++	    XUngrabServer (qt_xdisplay());
++	    XFlush (qt_xdisplay());
++
++	    if ( tray != None )
++	    {
++		    XEvent ev;
++		    memset(&ev, 0, sizeof( ev ));
++		    static Atom atom = XInternAtom( qt_xdisplay(), "_NET_SYSTEM_TRAY_OPCODE", False );
++		    ev.xclient.type = ClientMessage;
++		    ev.xclient.window = tray;
++		    ev.xclient.message_type = atom;
++		    ev.xclient.format = 32;
++		    ev.xclient.data.l[ 0 ] = qt_x_time;
++		    ev.xclient.data.l[ 1 ] = 0; // SYSTEM_TRAY_REQUEST_DOCK
++		    ev.xclient.data.l[ 2 ] = winId();
++		    ev.xclient.data.l[ 3 ] = 0; // unused
++		    ev.xclient.data.l[ 4 ] = 0; // unused
++
++		    XSendEvent( qt_xdisplay(), tray, False, NoEventMask, (XEvent *)&ev );
++		    XSync(qt_xdisplay(), FALSE );
++	    }
++    }
++
++
+     d = new KSystemTrayPrivate;
+     d->actionCollection = new KActionCollection(this);
+ 
================================================================


More information about the pld-cvs-commit mailing list