diff --git a/kdebase-workspace/trunk/PKGBUILD b/kdebase-workspace/trunk/PKGBUILD index 232ea3b..249df26 100644 --- a/kdebase-workspace/trunk/PKGBUILD +++ b/kdebase-workspace/trunk/PKGBUILD @@ -5,7 +5,7 @@ pkgname=kdebase-workspace _pkgname=kde-workspace pkgver=4.10.4 -pkgrel=1 +pkgrel=2 pkgdesc="Provides the interface and basic tools for the KDE workspace" arch=('i686' 'x86_64') url='https://projects.kde.org/projects/kde/kde-workspace' @@ -26,7 +26,8 @@ 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') + 'etc-scripts.patch' 'terminate-server.patch' 'kdm-xinitrd.patch' + 'kdebase-workspace-pixmap-leak-bugfix.patch') sha1sums=('9f3f4f63e6fe409eb2293ee361b481198fb852b5' '660eae40a707d2711d8d7f32a93214865506b795' '6aeecc9e0e221f0515c6bf544f9a3c11cb6961fe' @@ -35,7 +36,8 @@ sha1sums=('9f3f4f63e6fe409eb2293ee361b481198fb852b5' 'bbe55f2000217474ce7246f12ee437ceaaf7e9ae' 'c079ebd157c836ba996190f0d2bcea1a7828d02c' 'ac7bc292c865bc1ab8c02e6341aa7aeaf1a3eeee' - 'd509dac592bd8b310df27991b208c95b6d907514') + 'd509dac592bd8b310df27991b208c95b6d907514' + '2e2efaf5c0dadd8ade6359e0f54708c897dcdf27') prepare() { cd ${_pkgname}-${pkgver} @@ -47,6 +49,9 @@ prepare() { # KDEBUG#202629 patch -p0 -i "${srcdir}"/terminate-server.patch + + # KDEBUG#314919 + patch -p1 -i "${srcdir}"/kdebase-workspace-pixmap-leak-bugfix.patch } build() { diff --git a/kdebase-workspace/trunk/kdebase-workspace-pixmap-leak-bugfix.patch b/kdebase-workspace/trunk/kdebase-workspace-pixmap-leak-bugfix.patch new file mode 100644 index 0000000..97ed5e5 --- /dev/null +++ b/kdebase-workspace/trunk/kdebase-workspace-pixmap-leak-bugfix.patch @@ -0,0 +1,55 @@ +From: Andreas Hartmetz +Date: Tue, 02 Jul 2013 16:35:35 +0000 +Subject: Fix pixmap leak when the tray icon changes (e.g. when it's animated). +X-Git-Url: http://quickgit.kde.org/?p=kde-workspace.git&a=commitdiff&h=ec8e405ca447ba5bc5a9f6a2a12e2fa90412a0d4 +--- +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 +--- + + +--- a/plasma/generic/applets/systemtray/protocols/fdo/x11embedcontainer.cpp ++++ b/plasma/generic/applets/systemtray/protocols/fdo/x11embedcontainer.cpp +@@ -194,8 +194,7 @@ + + // 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 @@ + // 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; + } +