rpms/kdebase-workspace/devel kdebase-workspace-4.0.0-systemtray.patch, NONE, 1.1 kdebase-workspace.spec, 1.21, 1.22 kdebase-workspace-4.0.0-gtk_applets.patch, 1.1, NONE
Rex Dieter (rdieter)
fedora-extras-commits at redhat.com
Wed Jan 9 13:21:02 UTC 2008
Author: rdieter
Update of /cvs/pkgs/rpms/kdebase-workspace/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18073
Modified Files:
kdebase-workspace.spec
Added Files:
kdebase-workspace-4.0.0-systemtray.patch
Removed Files:
kdebase-workspace-4.0.0-gtk_applets.patch
Log Message:
* Wed Jan 09 2008 Rex Dieter <rdieter[AT]fedoraproject.org> 4.0.0-4
- use upstream systemtray patch (#427442, kde#153193#c35)
kdebase-workspace-4.0.0-systemtray.patch:
--- NEW FILE kdebase-workspace-4.0.0-systemtray.patch ---
diff -uNr systemtray-4.0.0/systemtraycontainer.cpp systemtray-4.0.1/systemtraycontainer.cpp
--- systemtray-4.0.0/systemtraycontainer.cpp 2008-01-09 21:55:21.000000000 +0900
+++ systemtray-4.0.1/systemtraycontainer.cpp 2008-01-09 21:55:44.000000000 +0900
@@ -28,22 +28,27 @@
// Qt
#include <QX11Info>
+#include <plasma/theme.h>
+
// Xlib
#include <X11/Xlib.h>
SystemTrayContainer::SystemTrayContainer(WId clientId, QWidget *parent)
- : QX11EmbedContainer(parent)
+ : KX11EmbedContainer(parent)
{
+ prepareFor( clientId ); // temporary hack, until QX11EmbedContainer gets fixed
connect(this, SIGNAL(clientClosed()), SLOT(deleteLater()));
connect(this, SIGNAL(error(QX11EmbedContainer::Error)), SLOT(handleError(QX11EmbedContainer::Error)));
// Tray icons have a fixed size of 22x22
setMinimumSize(22, 22);
- // HACK: Tell the client to draw it's own black background rather than
- // taking ours as things are broken with ARGB visuals it seems.
- XSetWindowBackgroundPixmap(QX11Info::display(), clientId, None);
- XSetWindowBackground(QX11Info::display(), clientId, 0 /* black */);
+ // Qt's regular quasi-transparent background doesn't work so set it to the
+ // theme's background color instead.
+ QPalette p = palette();
+ p.setBrush(QPalette::Window, Plasma::Theme::self()->backgroundColor());
+ setPalette(p);
+ setBackgroundRole(QPalette::Window);
kDebug() << "attempting to embed" << clientId;
embedClient(clientId);
@@ -62,3 +67,37 @@
Q_UNUSED(error);
deleteLater();
}
+
+
+// Temporary hack to change X window used by QX11EmbedContainer so that it matches
+// the window embedded into it (#153193).
+void KX11EmbedContainer::prepareFor( WId w )
+{
+ Display* dpy = QX11Info::display();
+ XWindowAttributes ga;
+ XGetWindowAttributes( dpy, w, &ga );
+ XSetWindowAttributes sa;
+ sa.background_pixel = WhitePixel( dpy, DefaultScreen( dpy ));
+ sa.border_pixel = BlackPixel( dpy, DefaultScreen( dpy ));
+ sa.colormap = ga.colormap;
+ Window ww = XCreateWindow( dpy, parentWidget() ? parentWidget()->winId() : DefaultRootWindow( dpy ),
+ 1, 1, 1, 1, 0, ga.depth, InputOutput, ga.visual,
+ CWBackPixel | CWBorderPixel | CWColormap, &sa );
+ create( ww, true, true );
+ // repeat everything from QX11EmbedContainer's ctor that might be relevant
+ setFocusPolicy(Qt::StrongFocus);
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ setAcceptDrops(true);
+ setEnabled(false);
+ XSelectInput( dpy, ww,
+ KeyPressMask | KeyReleaseMask
+ | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask
+ | KeymapStateMask
+ | PointerMotionMask
+ | EnterWindowMask | LeaveWindowMask
+ | FocusChangeMask
+ | ExposureMask
+ | StructureNotifyMask
+ | SubstructureNotifyMask);
+ XFlush( dpy );
+}
diff -uNr systemtray-4.0.0/systemtraycontainer.h systemtray-4.0.1/systemtraycontainer.h
--- systemtray-4.0.0/systemtraycontainer.h 2008-01-09 21:55:21.000000000 +0900
+++ systemtray-4.0.1/systemtraycontainer.h 2008-01-09 21:55:44.000000000 +0900
@@ -25,7 +25,16 @@
// Qt
#include <QX11EmbedContainer>
-class SystemTrayContainer: public QX11EmbedContainer
+class KX11EmbedContainer : public QX11EmbedContainer
+{
+Q_OBJECT
+public:
+ KX11EmbedContainer( QWidget* parent = NULL )
+ : QX11EmbedContainer( parent ) {}
+ void prepareFor( WId id );
+};
+
+class SystemTrayContainer: public KX11EmbedContainer
{
Q_OBJECT
Index: kdebase-workspace.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdebase-workspace/devel/kdebase-workspace.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- kdebase-workspace.spec 9 Jan 2008 00:30:26 -0000 1.21
+++ kdebase-workspace.spec 9 Jan 2008 13:20:18 -0000 1.22
@@ -6,7 +6,7 @@
Name: kdebase-workspace
Version: 4.0.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Source0: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/kdebase-workspace-%{version}.tar.bz2
License: GPLv2
Group: User Interface/Desktops
@@ -15,9 +15,8 @@
Patch1: kdebase-workspace-4.0.0-redhat-startkde.patch
Patch2: kdebase-workspace-4.0.0-consolekit-kdm.patch
-# svn diff -r 758245:758247
-# http://bugzilla.redhat.com/427442
-Patch3: kdebase-workspace-4.0.0-gtk_applets.patch
+# see http://bugs.kde.org/153193#c35
+Patch3: kdebase-workspace-4.0.0-systemtray.patch
# upgrade path for former kde-redhat'ers
Obsoletes: kdebase-kdm < 6:%{version}-%{release}
@@ -101,7 +100,9 @@
# ConsoleKit support for KDM (#228111, kde#147790)
%patch2 -p1 -b .consolekit
#
-#patch3 -p0 -b .gtk_applets
+pushd plasma/applets/systemtray
+%patch3 -p1 -b .systemtray
+popd
%build
@@ -213,6 +214,9 @@
%changelog
+* Wed Jan 09 2008 Rex Dieter <rdieter[AT]fedoraproject.org> 4.0.0-4
+- use upstream systemtray patch (#427442, kde#153193#c35)
+
* Tue Jan 08 2008 Rex Dieter <rdieter[AT]fedoraproject.org> 4.0.0-3
- respun tarball
- omit gtk_applet patch (for now, doesn't build)
--- kdebase-workspace-4.0.0-gtk_applets.patch DELETED ---
More information about the fedora-extras-commits
mailing list