Hello community, here is the log from the commit of package libkscreen2 for openSUSE:Factory checked in at 2015-09-02 07:51:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-07-08 06:57:50.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libkscreen2.new/libkscreen2.changes 2015-09-02 07:51:58.000000000 +0200 @@ -1,0 +2,21 @@ +Mon Aug 24 17:52:13 UTC 2015 - hrvoje.sen...@gmail.com + +- Update to 5.4.0: + * For more details please see: + https://www.kde.org/announcements/plasma-5.4.0.php + +------------------------------------------------------------------- +Sun Aug 16 10:17:06 UTC 2015 - hrvoje.sen...@gmail.com + +- Update to 5.3.95 aka 5.4 beta: + This release of Plasma brings many nice touches for our users + such as much improved high DPI support, KRunner auto-completion + and many new beautiful Breeze icons. It also lays the ground for + the future with a tech preview of Wayland session available. + We're shipping a few new components such as an Audio Volume + Plasma Widget, monitor calibration tool and the User Manager + tool comes out beta. + * For more details please see: + https://www.kde.org/announcements/plasma-5.3.95.php + +------------------------------------------------------------------- Old: ---- libkscreen-5.3.2.tar.xz New: ---- libkscreen-5.4.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libkscreen2.spec ++++++ --- /var/tmp/diff_new_pack.mg0PM5/_old 2015-09-02 07:51:58.000000000 +0200 +++ /var/tmp/diff_new_pack.mg0PM5/_new 2015-09-02 07:51:58.000000000 +0200 @@ -19,7 +19,7 @@ %define lname libKF5Screen6 %define plasma_version 5.0.0 Name: libkscreen2 -Version: 5.3.2 +Version: 5.4.0 Release: 0 BuildRequires: cmake >= 2.8.12 BuildRequires: extra-cmake-modules >= 0.0.12 ++++++ libkscreen-5.3.2.tar.xz -> libkscreen-5.4.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.3.2/CMakeLists.txt new/libkscreen-5.4.0/CMakeLists.txt --- old/libkscreen-5.3.2/CMakeLists.txt 2015-06-25 13:10:31.000000000 +0200 +++ new/libkscreen-5.4.0/CMakeLists.txt 2015-08-20 14:57:33.000000000 +0200 @@ -1,5 +1,5 @@ project(libkscreen) -set(PROJECT_VERSION "5.3.2") +set(PROJECT_VERSION "5.4.0") cmake_minimum_required(VERSION 2.8.12) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.3.2/autotests/configs/multipleoutput.json new/libkscreen-5.4.0/autotests/configs/multipleoutput.json --- old/libkscreen-5.3.2/autotests/configs/multipleoutput.json 2015-06-25 13:10:31.000000000 +0200 +++ new/libkscreen-5.4.0/autotests/configs/multipleoutput.json 2015-08-20 14:57:33.000000000 +0200 @@ -56,6 +56,10 @@ "x" : 0, "y" : 0 }, + "size" : { + "width" : 1280, + "height" : 800 + }, "currentModeId" : 3, "preferredModes" : [2], "rotation" : 1, @@ -111,6 +115,10 @@ "x" : 1280, "y" : 0 }, + "size" : { + "width" : 1920, + "height" : 1080 + }, "currentModeId" : 4, "preferredModes" : [4], "rotation" : 1, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.3.2/autotests/configs/singleoutput.json new/libkscreen-5.4.0/autotests/configs/singleoutput.json --- old/libkscreen-5.3.2/autotests/configs/singleoutput.json 2015-06-25 13:10:31.000000000 +0200 +++ new/libkscreen-5.4.0/autotests/configs/singleoutput.json 2015-08-20 14:57:33.000000000 +0200 @@ -56,6 +56,10 @@ "x" : 0, "y" : 0 }, + "size" : { + "width" : 1280, + "height" : 800 + }, "currentModeId" : 3, "preferredModes" : [3], "rotation" : 1, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.3.2/autotests/testconfigserializer.cpp new/libkscreen-5.4.0/autotests/testconfigserializer.cpp --- old/libkscreen-5.3.2/autotests/testconfigserializer.cpp 2015-06-25 13:10:31.000000000 +0200 +++ new/libkscreen-5.4.0/autotests/testconfigserializer.cpp 2015-08-20 14:57:33.000000000 +0200 @@ -148,6 +148,7 @@ output->setIcon(QString()); output->setModes(modes); output->setPos(QPoint(1280, 0)); + output->setSize(mode->size()); output->setRotation(KScreen::Output::None); output->setCurrentModeId(QLatin1String("1")); output->setPreferredModes(QStringList() << QLatin1String("1")); @@ -170,6 +171,10 @@ const QJsonObject pos = obj[QLatin1String("pos")].toObject(); QCOMPARE(pos[QLatin1String("x")].toInt(), output->pos().x()); QCOMPARE(pos[QLatin1String("y")].toInt(), output->pos().y()); + const QJsonObject size = obj[QLatin1String("size")].toObject(); + QCOMPARE(pos[QLatin1String("width")].toInt(), output->size().width()); + QCOMPARE(pos[QLatin1String("height")].toInt(), output->size().height()); + QCOMPARE(static_cast<KScreen::Output::Rotation>(obj[QLatin1String("rotation")].toInt()), output->rotation()); QCOMPARE(obj[QLatin1String("currentModeId")].toString(), output->currentModeId()); QCOMPARE(obj[QLatin1String("connected")].toBool(), output->isConnected()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.3.2/backends/fake/parser.cpp new/libkscreen-5.4.0/backends/fake/parser.cpp --- old/libkscreen-5.3.2/backends/fake/parser.cpp 2015-06-25 13:10:31.000000000 +0200 +++ new/libkscreen-5.4.0/backends/fake/parser.cpp 2015-08-20 14:57:33.000000000 +0200 @@ -184,6 +184,11 @@ map.remove(QLatin1Literal("pos")); } + if (map.contains("size")) { + output->setSize(Parser::sizeFromJson(map["size"].toMap())); + 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.3.2/backends/qscreen/qscreenoutput.cpp new/libkscreen-5.4.0/backends/qscreen/qscreenoutput.cpp --- old/libkscreen-5.3.2/backends/qscreen/qscreenoutput.cpp 2015-06-25 13:10:31.000000000 +0200 +++ new/libkscreen-5.4.0/backends/qscreen/qscreenoutput.cpp 2015-08-20 14:57:33.000000000 +0200 @@ -92,6 +92,7 @@ mm.setHeight(qRound(physicalHeight)); output->setSizeMm(mm); output->setPos(m_qscreen->availableGeometry().topLeft()); + output->setSize(m_qscreen->availableGeometry().size()); // Modes: we create a single default mode and go with that ModePtr mode(new Mode); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.3.2/backends/xrandr/xrandroutput.cpp new/libkscreen-5.4.0/backends/xrandr/xrandroutput.cpp --- old/libkscreen-5.3.2/backends/xrandr/xrandroutput.cpp 2015-06-25 13:10:31.000000000 +0200 +++ new/libkscreen-5.4.0/backends/xrandr/xrandroutput.cpp 2015-08-20 14:57:33.000000000 +0200 @@ -68,6 +68,11 @@ return m_crtc ? m_crtc->geometry().topLeft() : QPoint(); } +QSize XRandROutput::size() const +{ + return m_crtc ? m_crtc->geometry().size() : QSize(); +} + XRandRMode::Map XRandROutput::modes() const { return m_modes; @@ -368,6 +373,7 @@ }(m_clones)); kscreenOutput->setEnabled(isEnabled()); if (isEnabled()) { + kscreenOutput->setSize(size()); kscreenOutput->setPos(position()); kscreenOutput->setRotation(rotation()); kscreenOutput->setCurrentModeId(currentModeId()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.3.2/backends/xrandr/xrandroutput.h new/libkscreen-5.4.0/backends/xrandr/xrandroutput.h --- old/libkscreen-5.3.2/backends/xrandr/xrandroutput.h 2015-06-25 13:10:31.000000000 +0200 +++ new/libkscreen-5.4.0/backends/xrandr/xrandroutput.h 2015-08-20 14:57:33.000000000 +0200 @@ -59,6 +59,7 @@ bool isConnected() const; bool isPrimary() const; QPoint position() const; + QSize size() const; QString currentModeId() const; XRandRMode::Map modes() const; XRandRMode* currentMode() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.3.2/backends/xrandr1.1/xrandr11.cpp new/libkscreen-5.4.0/backends/xrandr1.1/xrandr11.cpp --- old/libkscreen-5.3.2/backends/xrandr1.1/xrandr11.cpp 2015-06-25 13:10:31.000000000 +0200 +++ new/libkscreen-5.4.0/backends/xrandr1.1/xrandr11.cpp 2015-08-20 14:57:33.000000000 +0200 @@ -150,6 +150,7 @@ if (x == info->sizeID && rate == info->rate) { output->setCurrentModeId(mode->id()); + output->setSize(mode->size()); } modes.insert(mode->id(), mode); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.3.2/src/configserializer.cpp new/libkscreen-5.4.0/src/configserializer.cpp --- old/libkscreen-5.3.2/src/configserializer.cpp 2015-06-25 13:10:31.000000000 +0200 +++ new/libkscreen-5.4.0/src/configserializer.cpp 2015-08-20 14:57:33.000000000 +0200 @@ -29,6 +29,7 @@ #include <QtDBus/QDBusArgument> #include <QJsonDocument> #include <QFile> +#include <QRect> using namespace KScreen; @@ -73,6 +74,7 @@ obj[QLatin1String("type")] = static_cast<int>(output->type()); obj[QLatin1String("icon")] = output->icon(); obj[QLatin1String("pos")] = serializePoint(output->pos()); + obj[QLatin1String("size")] = serializeSize(output->size()); obj[QLatin1String("rotation")] = static_cast<int>(output->rotation()); obj[QLatin1String("currentModeId")] = output->currentModeId(); obj[QLatin1String("preferredModes")] = serializeList(output->preferredModes()); @@ -217,6 +219,8 @@ output->setIcon(value.toString()); } else if (key == QLatin1String("pos")) { output->setPos(deserializePoint(value.value<QDBusArgument>())); + } else if (key == QLatin1String("size")) { + output->setSize(deserializeSize(value.value<QDBusArgument>())); } else if (key == QLatin1String("rotation")) { output->setRotation(static_cast<Output::Rotation>(value.toInt())); } else if (key == QLatin1String("currentModeId")) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.3.2/src/output.cpp new/libkscreen-5.4.0/src/output.cpp --- old/libkscreen-5.3.2/src/output.cpp 2015-06-25 13:10:31.000000000 +0200 +++ new/libkscreen-5.4.0/src/output.cpp 2015-08-20 14:57:33.000000000 +0200 @@ -52,9 +52,9 @@ currentMode(other.currentMode), preferredMode(other.preferredMode), preferredModes(other.preferredModes), - size(other.size), sizeMm(other.sizeMm), pos(other.pos), + size(other.size), rotation(other.rotation), connected(other.connected), enabled(other.enabled), @@ -79,9 +79,9 @@ QString currentMode; QString preferredMode; QStringList preferredModes; - QSize size; QSize sizeMm; QPoint pos; + QSize size; Rotation rotation; bool connected; bool enabled; @@ -313,6 +313,22 @@ Q_EMIT posChanged(); } +QSize Output::size() const +{ + return d->size; +} + +void Output::setSize(const QSize& size) +{ + if (d->size == size) { + return; + } + + d->size = size; + + Q_EMIT sizeChanged(); +} + Output::Rotation Output::rotation() const { return d->rotation; @@ -421,11 +437,12 @@ return QRect(); } - if (isHorizontal()) { - return QRect(pos(), currentMode()->size()); - } else { - return QRect(pos(), QSize(currentMode()->size().height(), currentMode()->size().width())); - } + // We can't use QRect(d->pos, d->size), because d->size does not reflect the + // actual rotation() set by caller, it's only updated when we get update from + // KScreen, but not when user changes mode or rotation manually + return isHorizontal() + ? QRect(d->pos, currentMode()->size()) + : QRect(d->pos, currentMode()->size().transposed()); } void Output::apply(const OutputPtr& other) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.3.2/src/output.h new/libkscreen-5.4.0/src/output.h --- old/libkscreen-5.3.2/src/output.h 2015-06-25 13:10:31.000000000 +0200 +++ new/libkscreen-5.4.0/src/output.h 2015-08-20 14:57:33.000000000 +0200 @@ -48,6 +48,7 @@ Q_PROPERTY(QString icon READ icon WRITE setIcon NOTIFY outputChanged) Q_PROPERTY(ModeList modes READ modes CONSTANT) Q_PROPERTY(QPoint pos READ pos WRITE setPos NOTIFY posChanged) + Q_PROPERTY(QSize size READ size WRITE setSize NOTIFY sizeChanged) Q_PROPERTY(Rotation rotation READ rotation WRITE setRotation NOTIFY rotationChanged) Q_PROPERTY(QString currentModeId READ currentModeId WRITE setCurrentModeId NOTIFY currentModeIdChanged) Q_PROPERTY(QString preferredModeId READ preferredModeId CONSTANT) @@ -122,6 +123,27 @@ QPoint pos() const; void setPos(const QPoint& pos); + /*** + * Returns actual size being rendered in the output + * + * The returned valued is after transformations have been applied to + * the resolution of the current mode. + * + * For example if currentMode is 1280x800 but it is a vertical screen + * the returned size will be 800x1280. + * + * If that same resolution (1280x800) is transformed and scale x2, the + * value returned will be 2560x1600. + * + * This property reflects the currently active output configuration and + * is not affected by current mode or orientation change made by user + * until the config is applied. + * + * @since 5.4 + */ + QSize size() const; + void setSize(const QSize& size); + Rotation rotation() const; void setRotation(Rotation rotation); /** @@ -147,14 +169,26 @@ void setEdid(const QByteArray &rawData); Edid* edid() const; + /** + * Returns the physical size of the screen in milimeters. + * + * @note Some broken GPUs or monitors return the size in centimeters instead + * of millimeters. KScreen at the moment is not sanitizing the values. + */ QSize sizeMm() const; void setSizeMm(const QSize &size); /** - * Returns a rectangle containing the current output position and size. + * Returns a rectangle containing the currently set output position and + * size. + * + * The geometry also reflects current orientation (i.e. if current mode + * is 1920x1080 and orientation is @p KScreen::Output::Left, then the + * size of the returned rectangle will be 1080x1920. * - * The geometry takes rotation into account, so if an 1920x1200 output - * is rotated by 90 deg, the geometry will be (0, 0, 1200, 1920)! + * This property contains the current settings stored in the particular + * Output object, so it is updated even when user changes current mode + * or orientation without applying the whole config/ */ QRect geometry() const; @@ -162,6 +196,7 @@ Q_SIGNALS: void outputChanged(); void posChanged(); + void sizeChanged(); void currentModeIdChanged(); void rotationChanged(); void isConnectedChanged();