summaryrefslogtreecommitdiff
path: root/extra/kdebase-workspace
diff options
context:
space:
mode:
Diffstat (limited to 'extra/kdebase-workspace')
-rw-r--r--extra/kdebase-workspace/PKGBUILD15
-rw-r--r--extra/kdebase-workspace/fix-plasma-memory-leak.patch53
2 files changed, 63 insertions, 5 deletions
diff --git a/extra/kdebase-workspace/PKGBUILD b/extra/kdebase-workspace/PKGBUILD
index 555202d13..8be7c6841 100644
--- a/extra/kdebase-workspace/PKGBUILD
+++ b/extra/kdebase-workspace/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 187940 2013-06-08 07:59:19Z andrea $
+# $Id: PKGBUILD 189503 2013-07-03 17:00:52Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
pkgname=kdebase-workspace
_pkgname=kde-workspace
-pkgver=4.10.4
+pkgver=4.10.5
pkgrel=1
pkgdesc="Provides the interface and basic tools for the KDE workspace"
arch=('i686' 'x86_64')
@@ -26,8 +26,9 @@ install="${pkgname}.install"
backup=('usr/share/config/kdm/kdmrc')
source=("http://download.kde.org/stable/${pkgver}/src/${_pkgname}-${pkgver}.tar.xz"
'kde.pam' 'kde-np.pam' 'kscreensaver.pam' 'kdm.service' 'kdm.logrotate'
- 'etc-scripts.patch' 'terminate-server.patch' 'kdm-xinitrd.patch')
-sha1sums=('9f3f4f63e6fe409eb2293ee361b481198fb852b5'
+ 'etc-scripts.patch' 'terminate-server.patch' 'kdm-xinitrd.patch'
+ 'fix-plasma-memory-leak.patch')
+sha1sums=('d4986c1b4e3232f74a6348116908a13aee073a93'
'660eae40a707d2711d8d7f32a93214865506b795'
'6aeecc9e0e221f0515c6bf544f9a3c11cb6961fe'
'106635aa1aae51d6f0668b1853f6c49a4fe9d3d8'
@@ -35,7 +36,8 @@ sha1sums=('9f3f4f63e6fe409eb2293ee361b481198fb852b5'
'bbe55f2000217474ce7246f12ee437ceaaf7e9ae'
'c079ebd157c836ba996190f0d2bcea1a7828d02c'
'ac7bc292c865bc1ab8c02e6341aa7aeaf1a3eeee'
- 'd509dac592bd8b310df27991b208c95b6d907514')
+ 'd509dac592bd8b310df27991b208c95b6d907514'
+ 'e453545568d20165f80b97dd270b5adc731d5f21')
prepare() {
cd ${_pkgname}-${pkgver}
@@ -47,6 +49,9 @@ prepare() {
# KDEBUG#202629
patch -p0 -i "${srcdir}"/terminate-server.patch
+
+ # KDEBUG#314919
+ patch -p1 -i "${srcdir}"/fix-plasma-memory-leak.patch
}
build() {
diff --git a/extra/kdebase-workspace/fix-plasma-memory-leak.patch b/extra/kdebase-workspace/fix-plasma-memory-leak.patch
new file mode 100644
index 000000000..78ced11b7
--- /dev/null
+++ b/extra/kdebase-workspace/fix-plasma-memory-leak.patch
@@ -0,0 +1,53 @@
+commit ec8e405ca447ba5bc5a9f6a2a12e2fa90412a0d4
+Author: Andreas Hartmetz <ahartmetz@gmail.com>
+Date: Tue Jul 2 18:35:35 2013 +0200
+
+ Fix pixmap leak when the tray icon changes (e.g. when it's animated).
+
+ This could easily leak 4KB/second of X pixmap memory.
+ All the actual difference comes from the QPixmap::ExplicitlyShared
+ argument, the rest is making some wonky-looking but working code look
+ less wonky.
+
+ BUG: 314919
+
+diff --git a/plasma/generic/applets/systemtray/protocols/fdo/x11embedcontainer.cpp b/plasma/generic/applets/systemtray/protocols/fdo/x11embedcontainer.cpp
+index 1826512..a5bc826 100644
+--- a/plasma/generic/applets/systemtray/protocols/fdo/x11embedcontainer.cpp
++++ b/plasma/generic/applets/systemtray/protocols/fdo/x11embedcontainer.cpp
+@@ -194,8 +194,7 @@ void X11EmbedContainer::paintEvent(QPaintEvent *event)
+
+ // Taking a detour via a QPixmap is unfortunately the only way we can get
+ // the window contents into Qt's backing store.
+- QPixmap pixmap(size());
+- pixmap = toX11Pixmap(pixmap);
++ QPixmap pixmap = toX11Pixmap(QPixmap(size()));
+ pixmap.fill(Qt::transparent);
+ XRenderComposite(x11Info().display(), PictOpSrc, d->picture, None, pixmap.x11PictureHandle(),
+ 0, 0, 0, 0, 0, 0, width(), height());
+@@ -232,16 +231,18 @@ void X11EmbedContainer::setBackgroundPixmap(QPixmap background)
+ // NOTE: The alpha-channel is not preserved if it exists, but for X pixmaps it generally should not be needed anyway.
+ QPixmap X11EmbedContainer::toX11Pixmap(const QPixmap& pix)
+ {
+- if(pix.handle() != 0) // X11 pixmap
++ if (pix.handle() != 0) // X11 pixmap
+ return pix;
++ QPixmap ret;
+ Pixmap xpix = XCreatePixmap(pix.x11Info().display(), RootWindow(pix.x11Info().display(), pix.x11Info().screen()),
+ pix.width(), pix.height(), QX11Info::appDepth());
+- QPixmap wrk = QPixmap::fromX11Pixmap(xpix);
+- QPainter paint(&wrk);
+- paint.drawPixmap(0, 0, pix);
+- paint.end();
+- QPixmap ret = wrk.copy();
+- wrk = QPixmap(); // reset, so that xpix can be freed (QPixmap does not own it)
++ {
++ QPixmap wrk = QPixmap::fromX11Pixmap(xpix, QPixmap::ExplicitlyShared);
++ QPainter paint(&wrk);
++ paint.drawPixmap(0, 0, pix);
++ paint.end();
++ ret = wrk.copy();
++ } // free resources so that xpix can be freed (QPixmap does not own it)
+ XFreePixmap(pix.x11Info().display(), xpix);
+ return ret;
+ }