Hello community, here is the log from the commit of package libkscreen2 for openSUSE:Factory checked in at 2017-01-31 12:21:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libkscreen2 (Old) and /work/SRC/openSUSE:Factory/.libkscreen2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libkscreen2" Changes: -------- --- /work/SRC/openSUSE:Factory/libkscreen2/libkscreen2.changes 2017-01-04 17:25:46.916877592 +0100 +++ /work/SRC/openSUSE:Factory/.libkscreen2.new/libkscreen2.changes 2017-02-03 17:47:50.798564095 +0100 @@ -1,0 +2,25 @@ +Thu Jan 26 19:58:37 CET 2017 - fab...@ritter-vogt.de + +- Update to 5.9.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/plasma-5.9.0.php +- Changes since 5.8.95: + * Fix type argument for get property call + +------------------------------------------------------------------- +Thu Jan 12 20:39:58 UTC 2017 - fab...@ritter-vogt.de + +- Update to 5.8.95 (Plasma 5.9 Beta) + * New feature release + * For more details please see: + https://www.kde.org/announcements/plasma-5.8.95.php +- Changes: + * Disable logging to kscreen.log by default. + * Scale property for KScreen::Output. + * Allow changing an output's modelist at runtime. Fixes kde#356864 + * Handle integer display types from config in fake backend. + * Include refresh rate in mode's debug handler. + * Add flag to for per-display scaling. + +------------------------------------------------------------------- Old: ---- libkscreen-5.8.5.tar.xz New: ---- libkscreen-5.9.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libkscreen2.spec ++++++ --- /var/tmp/diff_new_pack.WL0yjG/_old 2017-02-03 17:47:52.158372398 +0100 +++ /var/tmp/diff_new_pack.WL0yjG/_new 2017-02-03 17:47:52.162371834 +0100 @@ -1,7 +1,7 @@ # # spec file for package libkscreen2 # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,11 +18,11 @@ %define lname libKF5Screen7 Name: libkscreen2 -Version: 5.8.5 +Version: 5.9.0 Release: 0 -# Full Plasma 5 version (e.g. 5.8.5) +# Full Plasma 5 version (e.g. 5.9.0) %{!?_plasma5_bugfix: %global _plasma5_bugfix %{version}} -# Lasted ABI-stable Plasma (e.g. 5.8 in KF5, but 5.8.90 in KUF) +# Lasted ABI-stable Plasma (e.g. 5.8 in KF5, but 5.9.0 in KUF) %{!?_plasma5_version: %global _plasma5_version %(echo %{_plasma5_bugfix} | awk -F. '{print $1"."$2}')} BuildRequires: cmake >= 2.8.12 BuildRequires: extra-cmake-modules >= 5.14.0 @@ -40,7 +40,7 @@ License: GPL-2.0+ Group: System/GUI/KDE Url: http://www.kde.org -Source: http://download.kde.org/stable/plasma/%{version}/libkscreen-%{version}.tar.xz +Source: libkscreen-%{version}.tar.xz Source1: baselibs.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ libkscreen-5.8.5.tar.xz -> libkscreen-5.9.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.8.5/CMakeLists.txt new/libkscreen-5.9.0/CMakeLists.txt --- old/libkscreen-5.8.5/CMakeLists.txt 2016-12-27 12:29:03.000000000 +0100 +++ new/libkscreen-5.9.0/CMakeLists.txt 2017-01-26 13:20:05.000000000 +0100 @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.8.12) project(libkscreen) -set(PROJECT_VERSION "5.8.5") +set(PROJECT_VERSION "5.9.0") find_package(ECM 5.14.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.8.5/autotests/configs/multipleoutput.json new/libkscreen-5.9.0/autotests/configs/multipleoutput.json --- old/libkscreen-5.8.5/autotests/configs/multipleoutput.json 2016-12-27 12:29:03.000000000 +0100 +++ new/libkscreen-5.9.0/autotests/configs/multipleoutput.json 2017-01-26 13:20:05.000000000 +0100 @@ -119,6 +119,7 @@ "width" : 1920, "height" : 1080 }, + "scale" : 1.4, "currentModeId" : 4, "preferredModes" : [4], "rotation" : 1, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.8.5/autotests/testlog.cpp new/libkscreen-5.9.0/autotests/testlog.cpp --- old/libkscreen-5.8.5/autotests/testlog.cpp 2016-12-27 12:29:03.000000000 +0100 +++ new/libkscreen-5.9.0/autotests/testlog.cpp 2017-01-26 13:20:05.000000000 +0100 @@ -55,6 +55,7 @@ void TestLog::initTestCase() { + qputenv(KSCREEN_LOGGING, QByteArray("true")); } void TestLog::cleanupTestCase() @@ -85,6 +86,13 @@ qunsetenv(KSCREEN_LOGGING); log = Log::instance(); + QCOMPARE(log->enabled(), false); + QCOMPARE(log->logFile(), QString()); + + delete log; + qputenv(KSCREEN_LOGGING, QByteArray("truE")); + + log = Log::instance(); QCOMPARE(log->enabled(), true); QCOMPARE(log->logFile(), m_defaultLogFile); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.8.5/autotests/testscreenconfig.cpp new/libkscreen-5.9.0/autotests/testscreenconfig.cpp --- old/libkscreen-5.8.5/autotests/testscreenconfig.cpp 2016-12-27 12:29:03.000000000 +0100 +++ new/libkscreen-5.9.0/autotests/testscreenconfig.cpp 2017-01-26 13:20:05.000000000 +0100 @@ -109,6 +109,7 @@ QCOMPARE(output->currentModeId(), QLatin1String("3")); QCOMPARE(output->preferredModeId(), QLatin1String("3")); QCOMPARE(output->rotation(), Output::None); + QCOMPARE(output->scale(), 1.0); QCOMPARE(output->isConnected(), true); QCOMPARE(output->isEnabled(), true); QCOMPARE(output->isPrimary(), true); @@ -159,6 +160,7 @@ QCOMPARE(output->currentModeId(), QLatin1String("4")); QCOMPARE(output->preferredModeId(), QLatin1String("4")); QCOMPARE(output->rotation(), Output::None); + QCOMPARE(output->scale(), 1.4); QCOMPARE(output->isConnected(), true); QCOMPARE(output->isEnabled(), true); QCOMPARE(output->isPrimary(), false); @@ -242,11 +244,27 @@ ConfigPtr config = getConfig(); QVERIFY(config->supportedFeatures().testFlag(KScreen::Config::Feature::None)); + QVERIFY(!config->supportedFeatures().testFlag(KScreen::Config::Feature::Writable)); + QVERIFY(!config->supportedFeatures().testFlag(KScreen::Config::Feature::PrimaryDisplay)); + QVERIFY(!config->supportedFeatures().testFlag(KScreen::Config::Feature::PerOutputScaling)); config->setSupportedFeatures(KScreen::Config::Feature::Writable | KScreen::Config::Feature::PrimaryDisplay); + QVERIFY(config->supportedFeatures().testFlag(KScreen::Config::Feature::Writable)); + QVERIFY(config->supportedFeatures().testFlag(KScreen::Config::Feature::PrimaryDisplay)); + + config->setSupportedFeatures(KScreen::Config::Feature::None); + QVERIFY(config->supportedFeatures().testFlag(KScreen::Config::Feature::None)); + + config->setSupportedFeatures(KScreen::Config::Feature::PerOutputScaling | KScreen::Config::Feature::Writable); + QVERIFY(!config->supportedFeatures().testFlag(KScreen::Config::Feature::None)); + QVERIFY(config->supportedFeatures().testFlag(KScreen::Config::Feature::Writable)); + QVERIFY(config->supportedFeatures().testFlag(KScreen::Config::Feature::PerOutputScaling)); + config->setSupportedFeatures(KScreen::Config::Feature::PerOutputScaling | KScreen::Config::Feature::Writable | KScreen::Config::Feature::PrimaryDisplay); + QVERIFY(!config->supportedFeatures().testFlag(KScreen::Config::Feature::None)); QVERIFY(config->supportedFeatures().testFlag(KScreen::Config::Feature::Writable)); QVERIFY(config->supportedFeatures().testFlag(KScreen::Config::Feature::PrimaryDisplay)); + QVERIFY(config->supportedFeatures().testFlag(KScreen::Config::Feature::PerOutputScaling)); } void testScreenConfig::testInvalidMode() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.8.5/backends/fake/parser.cpp new/libkscreen-5.9.0/backends/fake/parser.cpp --- old/libkscreen-5.8.5/backends/fake/parser.cpp 2016-12-27 12:29:03.000000000 +0100 +++ new/libkscreen-5.9.0/backends/fake/parser.cpp 2017-01-26 13:20:05.000000000 +0100 @@ -86,12 +86,12 @@ for (QVariantMap::const_iterator iter = variant.begin(); iter != variant.end(); ++iter) { const int propertyIndex = metaObject->indexOfProperty(qPrintable(iter.key())); if (propertyIndex == -1) { - qWarning() << "Skipping non-existent property" << iter.key(); + //qWarning() << "Skipping non-existent property" << iter.key(); continue; } const QMetaProperty metaProperty = metaObject->property(propertyIndex); if (!metaProperty.isWritable()) { - qWarning() << "Skipping read-only property" << iter.key(); + //qWarning() << "Skipping read-only property" << iter.key(); continue; } @@ -142,7 +142,7 @@ } const QString type = map["type"].toByteArray().toUpper(); - if (type.contains("LVDS") || type.contains("EDP") || type.contains("IDP")) { + if (type.contains("LVDS") || type.contains("EDP") || type.contains("IDP") || type.contains("7")) { output->setType(Output::Panel); } else if (type.contains("VGA")) { output->setType(Output::VGA); @@ -154,7 +154,7 @@ output->setType(Output::DVIA); } else if (type.contains("DVI-D")) { output->setType(Output::DVID); - } else if (type.contains("HDMI")) { + } else if (type.contains("HDMI") || type.contains("6")) { output->setType(Output::HDMI); } else if (type.contains("Panel")) { output->setType(Output::Panel); @@ -170,7 +170,7 @@ output->setType(Output::TVSCART); } else if (type.contains("TV-C4")) { output->setType(Output::TVC4); - } else if (type.contains("DisplayPort")) { + } else if (type.contains("DisplayPort") || type.contains("14")) { output->setType(Output::DisplayPort); } else if (type.contains("Unknown")) { output->setType(Output::Unknown); @@ -189,6 +189,12 @@ map.remove(QLatin1Literal("size")); } + if (map.contains("scale")) { + qDebug() << "Scale found:" << map["scale"].toReal(); + output->setScale(map["scale"].toReal()); + map.remove(QLatin1Literal("size")); + } + //Remove some extra properties that we do not want or need special treatment map.remove(QLatin1Literal("edid")); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.8.5/backends/xrandr/xrandroutput.cpp new/libkscreen-5.9.0/backends/xrandr/xrandroutput.cpp --- old/libkscreen-5.8.5/backends/xrandr/xrandroutput.cpp 2016-12-27 12:29:03.000000000 +0100 +++ new/libkscreen-5.9.0/backends/xrandr/xrandroutput.cpp 2017-01-26 13:20:05.000000000 +0100 @@ -318,7 +318,7 @@ char *connectorType; - auto cookie = xcb_randr_get_output_property(XCB::connection(), outputId, atomType, + auto cookie = xcb_randr_get_output_property(XCB::connection(), outputId, atomType->atom, XCB_ATOM_ANY, 0, 100, false, false); XCB::ScopedPointer<xcb_randr_get_output_property_reply_t> reply(xcb_randr_get_output_property_reply(XCB::connection(), cookie, NULL)); if (!reply) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.8.5/src/config.h new/libkscreen-5.9.0/src/config.h --- old/libkscreen-5.8.5/src/config.h 2016-12-27 12:29:03.000000000 +0100 +++ new/libkscreen-5.9.0/src/config.h 2017-01-26 13:20:05.000000000 +0100 @@ -64,7 +64,8 @@ enum class Feature { None = 0, ///< None of the mentioned features are supported. PrimaryDisplay = 1, ///< The backend knows about the concept of a primary display, this is mostly limited to X11. - Writable = 1 << 1 ///< The backend supports setting the config, it's not read-only. + Writable = 1 << 1, ///< The backend supports setting the config, it's not read-only. + PerOutputScaling = 1 << 2 ///< The backend supports scaling each output individually. }; Q_DECLARE_FLAGS(Features, Feature) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.8.5/src/log.cpp new/libkscreen-5.9.0/src/log.cpp --- old/libkscreen-5.8.5/src/log.cpp 2016-12-27 12:29:03.000000000 +0100 +++ new/libkscreen-5.9.0/src/log.cpp 2017-01-26 13:20:05.000000000 +0100 @@ -57,7 +57,7 @@ { public: QString context; - bool enabled = true; + bool enabled = false; QString logFile; }; @@ -68,11 +68,13 @@ if (qEnvironmentVariableIsSet(logging_env)) { const QString logging_env_value = qgetenv(logging_env).constData(); - if (logging_env_value == QStringLiteral("0") || logging_env_value.toLower() == QStringLiteral("false")) { - d->enabled = false; - return; + if (logging_env_value != QStringLiteral("0") && logging_env_value.toLower() != QStringLiteral("false")) { + d->enabled = true; } } + if (!d->enabled) { + return; + } d->logFile = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/kscreen/kscreen.log"; QLoggingCategory::setFilterRules("kscreen.*=true"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.8.5/src/mode.cpp new/libkscreen-5.9.0/src/mode.cpp --- old/libkscreen-5.8.5/src/mode.cpp 2016-12-27 12:29:03.000000000 +0100 +++ new/libkscreen-5.9.0/src/mode.cpp 2017-01-26 13:20:05.000000000 +0100 @@ -129,11 +129,10 @@ Q_EMIT modeChanged(); } - QDebug operator<<(QDebug dbg, const KScreen::ModePtr &mode) { if (mode) { - dbg << "KScreen::Mode(Id:" << mode->id() << ", Size:" << mode->size() << ")"; + dbg << "KScreen::Mode(Id:" << mode->id() << ", Size:" << mode->size() << "@" << mode->refreshRate() << ")"; } else { dbg << "KScreen::Mode(NULL)"; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.8.5/src/output.cpp new/libkscreen-5.9.0/src/output.cpp --- old/libkscreen-5.8.5/src/output.cpp 2016-12-27 12:29:03.000000000 +0100 +++ new/libkscreen-5.9.0/src/output.cpp 2017-01-26 13:20:05.000000000 +0100 @@ -37,6 +37,7 @@ id(0), type(Unknown), rotation(None), + scale(1.0), connected(false), enabled(false), primary(false), @@ -56,6 +57,7 @@ pos(other.pos), size(other.size), rotation(other.rotation), + scale(other.scale), connected(other.connected), enabled(other.enabled), primary(other.primary) @@ -84,6 +86,7 @@ QPoint pos; QSize size; Rotation rotation; + qreal scale; bool connected; bool enabled; bool primary; @@ -377,6 +380,20 @@ Q_EMIT rotationChanged(); } +qreal Output::scale() const +{ + return d->scale; +} + +void Output::setScale(qreal factor) +{ + if (d->scale == factor) { + return; + } + d->scale = factor; + emit scaleChanged(); +} + bool Output::isConnected() const { return d->connected; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.8.5/src/output.h new/libkscreen-5.9.0/src/output.h --- old/libkscreen-5.8.5/src/output.h 2016-12-27 12:29:03.000000000 +0100 +++ new/libkscreen-5.9.0/src/output.h 2017-01-26 13:20:05.000000000 +0100 @@ -58,6 +58,8 @@ Q_PROPERTY(QList<int> clones READ clones WRITE setClones NOTIFY clonesChanged) Q_PROPERTY(KScreen::Edid* edid READ edid CONSTANT) Q_PROPERTY(QSize sizeMm READ sizeMm CONSTANT) + Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged) + enum Type { Unknown, @@ -192,6 +194,23 @@ */ QRect geometry() const; + /** + * returns the scaling factor to use for this output + * + * @since 5.9 + */ + qreal scale() const; + + /** + * Set the scaling factor for this output. + * + * @arg factor Scale factor to use for this output, the backend may or may not + * be able to deal with non-integer values, in that case, the factor gets rounded. + * + * @since 5.9 + */ + void setScale(qreal factor); + void apply(const OutputPtr &other); Q_SIGNALS: void outputChanged(); @@ -203,6 +222,7 @@ void isEnabledChanged(); void isPrimaryChanged(); void clonesChanged(); + void scaleChanged(); /** The mode list changed. *