Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libkscreen2 for openSUSE:Factory checked in at 2023-03-02 23:02:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libkscreen2 (Old) and /work/SRC/openSUSE:Factory/.libkscreen2.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libkscreen2" Thu Mar 2 23:02:27 2023 rev:153 rq:1068271 version:5.27.2 Changes: -------- --- /work/SRC/openSUSE:Factory/libkscreen2/libkscreen2.changes 2023-02-24 18:07:14.629096453 +0100 +++ /work/SRC/openSUSE:Factory/.libkscreen2.new.31432/libkscreen2.changes 2023-03-02 23:02:45.498962175 +0100 @@ -1,0 +2,12 @@ +Tue Feb 28 17:34:17 UTC 2023 - Fabian Vogt <[email protected]> + +- Update to 5.27.2 + * New bugfix release + * For more details please see: + * https://kde.org/announcements/plasma/5/5.27.2 +- Changes since 5.27.1: + * Revert "fix(randr): screen is dirty when switching display modes" (kde#462725) + * dpms/wayland: properly manage org_kde_kwin_dpms instances + * dpms/wayland: Explicitly set as unsupported if addRegistryListener didn't find the interface (kde#466181) + +------------------------------------------------------------------- Old: ---- libkscreen-5.27.1.tar.xz libkscreen-5.27.1.tar.xz.sig New: ---- libkscreen-5.27.2.tar.xz libkscreen-5.27.2.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libkscreen2.spec ++++++ --- /var/tmp/diff_new_pack.pEWHJy/_old 2023-03-02 23:02:46.078964802 +0100 +++ /var/tmp/diff_new_pack.pEWHJy/_new 2023-03-02 23:02:46.086964838 +0100 @@ -20,7 +20,7 @@ %define sover 8 %define lname libKF5Screen%{sover} Name: libkscreen2 -Version: 5.27.1 +Version: 5.27.2 Release: 0 # Full Plasma 5 version (e.g. 5.8.95) %{!?_plasma5_bugfix: %define _plasma5_bugfix %{version}} ++++++ libkscreen-5.27.1.tar.xz -> libkscreen-5.27.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.27.1/CMakeLists.txt new/libkscreen-5.27.2/CMakeLists.txt --- old/libkscreen-5.27.1/CMakeLists.txt 2023-02-21 12:40:18.000000000 +0100 +++ new/libkscreen-5.27.2/CMakeLists.txt 2023-02-28 13:20:46.000000000 +0100 @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) project(libkscreen) -set(PROJECT_VERSION "5.27.1") +set(PROJECT_VERSION "5.27.2") set(QT_MIN_VERSION "5.15.2") set(KF5_MIN_VERSION "5.102.0") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.27.1/backends/xrandr/xrandrconfig.cpp new/libkscreen-5.27.2/backends/xrandr/xrandrconfig.cpp --- old/libkscreen-5.27.1/backends/xrandr/xrandrconfig.cpp 2023-02-21 12:40:18.000000000 +0100 +++ new/libkscreen-5.27.2/backends/xrandr/xrandrconfig.cpp 2023-02-28 13:20:46.000000000 +0100 @@ -128,11 +128,16 @@ const QSize newScreenSize = screenSize(config); const QSize currentScreenSize = m_screen->currentSize(); - // Previously we initially set such screen size, that it can take the current - // as well as the new configuration, then we apply the output changes, - // and finally then (if necessary) we reduce the screen size to - // fix the new configuration precisely.Now we initially disable the output, - // then set the target screen size, and finally we apply the output changes. + // When the current screen configuration is bigger than the new size (like + // when rotating an output), the XSetScreenSize can fail or apply the smaller + // size only partially, because we apply the size (we have to) before the + // output changes. To prevent all kinds of weird screen sizes from happening, + // we initially set such screen size, that it can take the current as well + // as the new configuration, then we apply the output changes, and finally then + // (if necessary) we reduce the screen size to fix the new configuration precisely. + const QSize intermediateScreenSize = + QSize(qMax(newScreenSize.width(), currentScreenSize.width()), qMax(newScreenSize.height(), currentScreenSize.height())); + int neededCrtcs = 0; // pairs of before/after @@ -246,6 +251,7 @@ qCDebug(KSCREEN_XRANDR) << "\tChange Screen Size:" << (newScreenSize != currentScreenSize); if (newScreenSize != currentScreenSize) { qCDebug(KSCREEN_XRANDR) << "\t\tOld:" << currentScreenSize << "\n" + << "\t\tIntermediate:" << intermediateScreenSize << "\n" << "\t\tNew:" << newScreenSize; } @@ -280,14 +286,24 @@ disableOutput(output); } - if (currentScreenSize != newScreenSize) { - for (const KScreen::OutputPtr &output : toChange) { - disableOutput(output); - } + if (intermediateScreenSize != currentScreenSize) { + setScreenSize(intermediateScreenSize); } bool forceScreenSizeUpdate = false; + for (const KScreen::OutputPtr &output : toChange) { + if (!changeOutput(output)) { + /* If we disabled the output before changing it and XRandR failed + * to re-enable it, then update screen size too */ + if (toDisable.contains(output->id())) { + output->setEnabled(false); + qCDebug(KSCREEN_XRANDR) << "Output failed to change: " << output->name(); + forceScreenSizeUpdate = true; + } + } + } + for (const KScreen::OutputPtr &output : toEnable) { if (!enableOutput(output)) { qCDebug(KSCREEN_XRANDR) << "Output failed to be Enabled: " << output->name(); @@ -302,7 +318,7 @@ setOutputPriority(outputId, priority); } - if (forceScreenSizeUpdate || currentScreenSize != newScreenSize) { + if (forceScreenSizeUpdate || intermediateScreenSize != newScreenSize) { QSize newSize = newScreenSize; if (forceScreenSizeUpdate) { newSize = screenSize(config); @@ -310,17 +326,6 @@ } setScreenSize(newSize); } - - for (const KScreen::OutputPtr &output : toChange) { - if (!changeOutput(output)) { - /* If we disabled the output before changing it and XRandR failed - * to re-enable it, then update screen size too */ - if (toDisable.contains(output->id())) { - output->setEnabled(false); - qCDebug(KSCREEN_XRANDR) << "Output failed to change: " << output->name(); - } - } - } } void XRandRConfig::printConfig(const ConfigPtr &config) const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.27.1/poqm/zh_CN/libkscreen5_qt.po new/libkscreen-5.27.2/poqm/zh_CN/libkscreen5_qt.po --- old/libkscreen-5.27.1/poqm/zh_CN/libkscreen5_qt.po 2023-02-21 12:40:18.000000000 +0100 +++ new/libkscreen-5.27.2/poqm/zh_CN/libkscreen5_qt.po 2023-02-28 13:20:46.000000000 +0100 @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: kdeorg\n" -"PO-Revision-Date: 2023-02-15 11:08\n" +"PO-Revision-Date: 2023-02-24 12:59\n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.27.1/src/libdpms/abstractdpmshelper_p.h new/libkscreen-5.27.2/src/libdpms/abstractdpmshelper_p.h --- old/libkscreen-5.27.1/src/libdpms/abstractdpmshelper_p.h 2023-02-21 12:40:18.000000000 +0100 +++ new/libkscreen-5.27.2/src/libdpms/abstractdpmshelper_p.h 2023-02-28 13:20:46.000000000 +0100 @@ -23,7 +23,7 @@ virtual void trigger(Dpms::Mode, const QList<QScreen *> &screens) = 0; - bool isSupported() const + bool isSupported() { if (!m_supported.has_value()) { blockUntilSupported(); @@ -58,7 +58,7 @@ void hasPendingChangesChanged(bool pendingChanges); private: - virtual void blockUntilSupported() const {} + virtual void blockUntilSupported() {} std::optional<bool> m_supported; bool m_hasPendingChanges = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.27.1/src/libdpms/waylanddpmshelper.cpp new/libkscreen-5.27.2/src/libdpms/waylanddpmshelper.cpp --- old/libkscreen-5.27.1/src/libdpms/waylanddpmshelper.cpp 2023-02-21 12:40:18.000000000 +0100 +++ new/libkscreen-5.27.2/src/libdpms/waylanddpmshelper.cpp 2023-02-28 13:20:46.000000000 +0100 @@ -90,13 +90,19 @@ const auto screens = qGuiApp->screens(); for (QScreen *screen : screens) { - QPlatformNativeInterface *native = qGuiApp->platformNativeInterface(); - wl_output *output = reinterpret_cast<wl_output *>(native->nativeResourceForScreen(QByteArrayLiteral("output"), screen)); - m_dpmsPerScreen[screen] = new Dpms(get(output), m_dpms, screen); + addScreen(screen); } + connect(qGuiApp, &QGuiApplication::screenAdded, this, &DpmsManager::addScreen); + connect(qGuiApp, &QGuiApplication::screenRemoved, this, [this](QScreen *screen) { + delete m_dpmsPerScreen.take(screen); + }); m_dpms->setSupported(hasDpms); }); } + ~DpmsManager() + { + qDeleteAll(m_dpmsPerScreen); + } Dpms *fetch(QScreen *screen) { @@ -104,6 +110,15 @@ } private: + void addScreen(QScreen *screen) + { + QPlatformNativeInterface *native = qGuiApp->platformNativeInterface(); + wl_output *output = reinterpret_cast<wl_output *>(native->nativeResourceForScreen(QByteArrayLiteral("output"), screen)); + if (output) { + m_dpmsPerScreen[screen] = new Dpms(get(output), m_dpms, screen); + } + } + WaylandDpmsHelper *const m_dpms; QHash<QScreen *, Dpms *> m_dpmsPerScreen; }; @@ -166,7 +181,10 @@ setHasPendingChanges(false); } -void WaylandDpmsHelper::blockUntilSupported() const +void WaylandDpmsHelper::blockUntilSupported() { QMetaObject::invokeMethod(m_dpmsManager, "addRegistryListener"); + if (!m_dpmsManager->isActive()) { + setSupported(false); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.27.1/src/libdpms/waylanddpmshelper_p.h new/libkscreen-5.27.2/src/libdpms/waylanddpmshelper_p.h --- old/libkscreen-5.27.1/src/libdpms/waylanddpmshelper_p.h 2023-02-21 12:40:18.000000000 +0100 +++ new/libkscreen-5.27.2/src/libdpms/waylanddpmshelper_p.h 2023-02-28 13:20:46.000000000 +0100 @@ -22,7 +22,7 @@ void trigger(KScreen::Dpms::Mode mode, const QList<QScreen *> &screens) override; private: - void blockUntilSupported() const override; + void blockUntilSupported() override; DpmsManager *m_dpmsManager = nullptr; };
