Hello community, here is the log from the commit of package plasma5-workspace for openSUSE:Factory checked in at 2016-10-18 10:02:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/plasma5-workspace (Old) and /work/SRC/openSUSE:Factory/.plasma5-workspace.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "plasma5-workspace" Changes: -------- --- /work/SRC/openSUSE:Factory/plasma5-workspace/plasma5-workspace.changes 2016-10-06 22:22:13.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.plasma5-workspace.new/plasma5-workspace.changes 2016-10-18 10:02:10.000000000 +0200 @@ -1,0 +2,19 @@ +Tue Oct 11 15:44:28 UTC 2016 - [email protected] + +- Update to 5.8.1 + * New bugfix release + * For more details please see: + https://www.kde.org/announcements/plasma-5.8.1.php +- Removed upstream patches: + * 0001-save-the-containment-only-aftyer-switch.patch +- Remove copyrighted picture (kde#370490) + +------------------------------------------------------------------- +Fri Oct 7 16:46:37 UTC 2016 - [email protected] + +- Add keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff: + * Chooses a new preferred background image when the screen + resolution is changed to keep the correct aspect ratio (boo#990257). + Also check for division by zero. + +------------------------------------------------------------------- Old: ---- 0001-save-the-containment-only-aftyer-switch.patch plasma-workspace-5.8.0.tar.xz New: ---- keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff plasma-workspace-5.8.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ plasma5-workspace.spec ++++++ --- /var/tmp/diff_new_pack.H5Njgw/_old 2016-10-18 10:02:12.000000000 +0200 +++ /var/tmp/diff_new_pack.H5Njgw/_new 2016-10-18 10:02:12.000000000 +0200 @@ -20,7 +20,7 @@ %bcond_without lang Name: plasma5-workspace -Version: 5.8.0 +Version: 5.8.1 Release: 0 %{!?_plasma5_version: %global _plasma5_version %{version}} Summary: The KDE Plasma Workspace Components @@ -37,9 +37,9 @@ Patch2: 0001-Ignore-default-sddm-face-icons.patch # PATCH-FIX-OPENSUSE add-tray-icon-cache.patch kde#356479 [email protected] -- Workaround for high load due to animated tray icons Patch3: add-tray-icon-cache.patch +# PATCH-FIX-UPSTREAM keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff [email protected] -- Keep wallpaper aspect ratio on screen resolution change +Patch4: keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff # PATCHES 100-200 and above are from upstream 5.8 branch -# PATCH-FIX-UPSTREAM 0001-save-the-containment-only-aftyer-switch.patch -- Do not overwrite containment on startup -Patch100: 0001-save-the-containment-only-aftyer-switch.patch # PATCHES 201-300 and above are from upstream master/5.9 branch BuildRequires: breeze5-icons BuildRequires: fdupes @@ -210,7 +210,7 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch100 -p1 +%patch4 -p1 %build %cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir} @@ -231,6 +231,8 @@ # we have a separate package for Plasma5 session rm -rfv %{buildroot}%{_kf5_sharedir}/xsessions rm -rfv %{buildroot}%{_kf5_sharedir}/wayland-sessions + # apparently a copyright violation (kde#370490) + rm %{buildroot}%{_datadir}/sddm/themes/breeze/face1.jpeg %fdupes %{buildroot}/%{_prefix} %post -p /sbin/ldconfig @@ -338,7 +340,7 @@ %if %{with lang} %files lang -f %{name}.lang -%doc %lang(ca) %{_kf5_htmldir}/ca/ +%doc %lang(de) %{_kf5_htmldir}/de/ %endif %changelog ++++++ keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff ++++++ diff --git a/wallpapers/image/image.cpp b/wallpapers/image/image.cpp index 0aa72bb..0a65b7d 100644 --- a/wallpapers/image/image.cpp +++ b/wallpapers/image/image.cpp @@ -192,7 +192,7 @@ void Image::findPreferedImageInPackage(KPackage::Package &package) // choose the nearest resolution, always preferring images with the same aspect ratio float best = FLT_MAX; float bestWithSameAspectRatio = FLT_MAX; - float targetAspectRatio = m_targetSize.width()/(float)m_targetSize.height(); + float targetAspectRatio = ( m_targetSize.height() > 0 ) ? m_targetSize.width() / (float)m_targetSize.height() : 0; QString bestImage; QString bestImageWithSameAspectRatio; @@ -201,7 +201,7 @@ void Image::findPreferedImageInPackage(KPackage::Package &package) if (candidate == QSize()) { continue; } - float candidateAspectRatio = candidate.width()/(float)candidate.height(); + float candidateAspectRatio = (candidate.height() > 0 ) ? candidate.width() / (float)candidate.height() : FLT_MAX; double dist = distance(candidate, m_targetSize); //qDebug() << "candidate" << candidate << "distance" << dist << "aspect ratio" << candidateAspectRatio; @@ -235,9 +235,15 @@ QSize Image::targetSize() const void Image::setTargetSize(const QSize &size) { + bool sizeChanged = m_targetSize != size; m_targetSize = size; if (m_mode == SingleImage) { + if (sizeChanged) { + // If screen size was changed, we may want to select a new preferred image + // which has correct aspect ratio for the new screen size. + m_wallpaperPackage.removeDefinition("preferred"); + } setSingleImage(); } } ++++++ plasma-workspace-5.8.0.tar.xz -> plasma-workspace-5.8.1.tar.xz ++++++ /work/SRC/openSUSE:Factory/plasma5-workspace/plasma-workspace-5.8.0.tar.xz /work/SRC/openSUSE:Factory/.plasma5-workspace.new/plasma-workspace-5.8.1.tar.xz differ: char 27, line 1
