From adc85e5dc4f2c9c089c55fe622699a003a359d3e Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 12 Jan 2009 13:43:16 +0000 Subject: [PATCH] fix a crash (appearing in KSMServer) --- kdelibs-4.1.96-crash.patch | 42 ++++++++++++++++++++++++++++++++++++++ kdelibs.spec | 11 +++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 kdelibs-4.1.96-crash.patch diff --git a/kdelibs-4.1.96-crash.patch b/kdelibs-4.1.96-crash.patch new file mode 100644 index 0000000..1d04abd --- /dev/null +++ b/kdelibs-4.1.96-crash.patch @@ -0,0 +1,42 @@ +--- kdelibs-4.1.96/plasma/framesvg.cpp.orig 2009/01/06 17:13:38 906699 ++++ kdelibs-4.1.96/plasma/framesvg.cpp 2009/01/11 17:31:47 909478 +@@ -583,7 +583,8 @@ + } + } + } else { +- if (frame->enabledBorders & FrameSvg::LeftBorder && q->hasElement(prefix + "left")) { ++ if (frame->enabledBorders & FrameSvg::LeftBorder && q->hasElement(prefix + "left") ++ && leftHeight > 0 && frame->leftWidth > 0) { + QPixmap left(frame->leftWidth, leftHeight); + left.fill(Qt::transparent); + +@@ -594,7 +595,8 @@ + p.drawTiledPixmap(QRect(leftOffset, contentTop, frame->leftWidth, contentHeight), left); + } + +- if (frame->enabledBorders & FrameSvg::RightBorder && q->hasElement(prefix + "right")) { ++ if (frame->enabledBorders & FrameSvg::RightBorder && q->hasElement(prefix + "right") && ++ leftHeight > 0 && frame->rightWidth > 0) { + QPixmap right(frame->rightWidth, leftHeight); + right.fill(Qt::transparent); + +@@ -605,7 +607,8 @@ + p.drawTiledPixmap(QRect(rightOffset, contentTop, frame->rightWidth, contentHeight), right); + } + +- if (frame->enabledBorders & FrameSvg::TopBorder && q->hasElement(prefix + "top")) { ++ if (frame->enabledBorders & FrameSvg::TopBorder && q->hasElement(prefix + "top") ++ && topWidth > 0 && frame->topHeight > 0) { + QPixmap top(topWidth, frame->topHeight); + top.fill(Qt::transparent); + +@@ -616,7 +619,8 @@ + p.drawTiledPixmap(QRect(contentLeft, topOffset, contentWidth, frame->topHeight), top); + } + +- if (frame->enabledBorders & FrameSvg::BottomBorder && q->hasElement(prefix + "bottom")) { ++ if (frame->enabledBorders & FrameSvg::BottomBorder && q->hasElement(prefix + "bottom") ++ && topWidth > 0 && frame->bottomHeight > 0) { + QPixmap bottom(topWidth, frame->bottomHeight); + bottom.fill(Qt::transparent); + diff --git a/kdelibs.spec b/kdelibs.spec index 8c84f03..0636861 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -1,6 +1,6 @@ Summary: K Desktop Environment 4 - Libraries Version: 4.1.96 -Release: 5%{?dist} +Release: 6%{?dist} %if 0%{?fedora} > 8 Name: kdelibs @@ -80,6 +80,9 @@ Patch20: kdelibs-4.1.70-cmake.patch Patch21: kdelibs-4.1.85-plasma-default-wallpaper.patch Patch22: kdelibs-4.1.96-cmake.patch +# upstream +Patch100: kdelibs-4.1.96-crash.patch + BuildRequires: qt4-devel >= 4.4.0 Requires: qt4 >= %{_qt4_version} Requires: xdg-utils @@ -205,6 +208,9 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage %patch21 -p1 -b .plasma-default-wallpaper %patch22 -p1 -b .kdepimlibs-cmake +# upstream patches +%patch100 -p1 -b .crash + %build mkdir -p %{_target_platform} @@ -365,6 +371,9 @@ rm -rf %{buildroot} %changelog +* Mon Jan 12 2009 Than Ngo - 4.1.96-6 +- fix a crash (appearing in KSMServer) + * Sat Jan 10 2009 Than Ngo - 4.1.96-5 - kdeworkspace cmake files in correct place