From ec14fb7a2affb2607ef08fc3b4b275dad0e7ed8432f68cf4dfdfcf85b20db9a0 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Fri, 7 Oct 2016 18:24:54 +0000 Subject: [PATCH 1/3] Accepting request 433788 from home:alarrosa:branches:KDE:Frameworks5:LTS - 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. Note that for this patch to work correctly, it needs a kpackage with https://build.opensuse.org/request/show/433784 applied. OBS-URL: https://build.opensuse.org/request/show/433788 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5:LTS/plasma5-workspace?expand=0&rev=28 --- ...wallpaper-on-screen-resolution-change.diff | 38 +++++++++++++++++++ plasma5-workspace.changes | 8 ++++ plasma5-workspace.spec | 3 ++ 3 files changed, 49 insertions(+) create mode 100644 keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff diff --git a/keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff b/keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff new file mode 100644 index 0000000..1809b1d --- /dev/null +++ b/keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff @@ -0,0 +1,38 @@ +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(); + } + } diff --git a/plasma5-workspace.changes b/plasma5-workspace.changes index bb3babf..059979e 100644 --- a/plasma5-workspace.changes +++ b/plasma5-workspace.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Oct 7 16:46:37 UTC 2016 - alarrosa@suse.com + +- 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. + ------------------------------------------------------------------- Thu Oct 6 17:18:45 UTC 2016 - fabian@ritter-vogt.de diff --git a/plasma5-workspace.spec b/plasma5-workspace.spec index 2b30dd5..f0dc5bf 100644 --- a/plasma5-workspace.spec +++ b/plasma5-workspace.spec @@ -37,6 +37,8 @@ Patch1: change-kioremote-severity.patch Patch2: 0001-Ignore-default-sddm-face-icons.patch # PATCH-FIX-OPENSUSE add-tray-icon-cache.patch kde#356479 fabian@ritter-vogt.de -- 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 alarrosa@suse.com -- 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 @@ -210,6 +212,7 @@ workspace. Development files. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %patch100 -p1 %build From a0236cf4b7e3bc70c3b8332e073341463266d24df75fc577e9bc11fe524cda39 Mon Sep 17 00:00:00 2001 From: Wolfgang Bauer Date: Fri, 7 Oct 2016 19:52:05 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5:LTS/plasma5-workspace?expand=0&rev=29 --- plasma5-workspace.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plasma5-workspace.spec b/plasma5-workspace.spec index f0dc5bf..9f37e71 100644 --- a/plasma5-workspace.spec +++ b/plasma5-workspace.spec @@ -32,7 +32,7 @@ Source1: baselibs.conf # PATCH-FIX-OPENSUSE 0001-Rename-qdbus-in-startkde.patch cgiboudeaux@gmx.com -- Rename the qdbus executable in startkde Patch0: 0001-Rename-qdbus-in-startkde.patch # PATCH-FIX-OPENSUSE change-kioremote-severity.patch boo#997173 fabian@ritter-vogt.de -- Change default log severity for log_kioremote -Patch1: change-kioremote-severity.patch +Patch1: change-kioremote-severity.patch # PATCH-FIX-OPENSUSE 0001-Ignore-default-sddm-face-icons.patch boo#1001364 fabian@ritter-vogt.de -- Ignore default sddm face icons Patch2: 0001-Ignore-default-sddm-face-icons.patch # PATCH-FIX-OPENSUSE add-tray-icon-cache.patch kde#356479 fabian@ritter-vogt.de -- Workaround for high load due to animated tray icons From bf94167042ba4bb2cbc8106cdd63722750fe6db0c8767e31fc6b1068596fd24f Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Wed, 12 Oct 2016 05:24:24 +0000 Subject: [PATCH 3/3] Update to Plasma 5.8.1 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5:LTS/plasma5-workspace?expand=0&rev=30 --- ...e-the-containment-only-aftyer-switch.patch | 52 ------------------- plasma-workspace-5.8.0.tar.xz | 3 -- plasma-workspace-5.8.1.tar.xz | 3 ++ plasma5-workspace.changes | 11 ++++ plasma5-workspace.spec | 9 ++-- 5 files changed, 18 insertions(+), 60 deletions(-) delete mode 100644 0001-save-the-containment-only-aftyer-switch.patch delete mode 100644 plasma-workspace-5.8.0.tar.xz create mode 100644 plasma-workspace-5.8.1.tar.xz diff --git a/0001-save-the-containment-only-aftyer-switch.patch b/0001-save-the-containment-only-aftyer-switch.patch deleted file mode 100644 index 10d26fe..0000000 --- a/0001-save-the-containment-only-aftyer-switch.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 53b2a407af9d1d60cfbb1a42af8546ab0a156d38 Mon Sep 17 00:00:00 2001 -From: Marco Martin -Date: Thu, 6 Oct 2016 15:50:05 +0200 -Subject: [PATCH] save the containment only aftyer switch - -Summary: -during a type switch -if the new containment gets saved before getting a view, -it will get lastScreen=-1 so the next boot -it will create a new containment - -Test Plan: -switched repeatedly between desktop and folderview -the config file always got with the correct lastScreen=0 entry - -Reviewers: #plasma - -Subscribers: plasma-devel - -Tags: #plasma - -Differential Revision: https://phabricator.kde.org/D2966 ---- - shell/shellcorona.cpp | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp -index 1d08cd1..74f6ded 100644 ---- a/shell/shellcorona.cpp -+++ b/shell/shellcorona.cpp -@@ -1562,8 +1562,6 @@ Plasma::Containment *ShellCorona::setContainmentTypeForScreen(int screen, const - newCg.writeEntry("activityId", oldContainment->activity()); - newContainment->restore(newCg); - newContainment->updateConstraints(Plasma::Types::StartupCompletedConstraint); -- newContainment->save(newCg); -- requestConfigSync(); - newContainment->flushPendingConstraintsEvents(); - emit containmentAdded(newContainment); - -@@ -1588,6 +1586,9 @@ Plasma::Containment *ShellCorona::setContainmentTypeForScreen(int screen, const - view->rootObject()->setFocus(true, Qt::MouseFocusReason); - QTimer::singleShot(2500, oldContainment, &Plasma::Applet::destroy); - -+ //Save now as we now have a screen, so lastScreen will not be -1 -+ newContainment->save(newCg); -+ requestConfigSync(); - emit availableScreenRectChanged(); - - return newContainment; --- -2.10.0 - diff --git a/plasma-workspace-5.8.0.tar.xz b/plasma-workspace-5.8.0.tar.xz deleted file mode 100644 index 97712d9..0000000 --- a/plasma-workspace-5.8.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:365b152c69ee7863bd1abe0e339707e412384beeb10294aacbc07e3d9da2b319 -size 7411612 diff --git a/plasma-workspace-5.8.1.tar.xz b/plasma-workspace-5.8.1.tar.xz new file mode 100644 index 0000000..2ae2082 --- /dev/null +++ b/plasma-workspace-5.8.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c05a38b94fb815957d6b572dfb43f1d8624654c3e23d9344751063118c4aed5c +size 7377128 diff --git a/plasma5-workspace.changes b/plasma5-workspace.changes index 059979e..0845728 100644 --- a/plasma5-workspace.changes +++ b/plasma5-workspace.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Oct 11 15:44:28 UTC 2016 - fabian@ritter-vogt.de + +- 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 - alarrosa@suse.com diff --git a/plasma5-workspace.spec b/plasma5-workspace.spec index 9f37e71..a196cfc 100644 --- a/plasma5-workspace.spec +++ b/plasma5-workspace.spec @@ -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 @@ -40,8 +40,6 @@ Patch3: add-tray-icon-cache.patch # PATCH-FIX-UPSTREAM keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff alarrosa@suse.com -- 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 @@ -213,7 +211,6 @@ workspace. Development files. %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch100 -p1 %build %cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir} @@ -234,6 +231,8 @@ workspace. Development files. # 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 @@ -341,7 +340,7 @@ workspace. Development files. %if %{with lang} %files lang -f %{name}.lang -%doc %lang(ca) %{_kf5_htmldir}/ca/ +%doc %lang(de) %{_kf5_htmldir}/de/ %endif %changelog