From 117bf847381d989f491757e52d69d759c8de5ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Wed, 28 Jan 2015 22:27:31 +0100 Subject: [PATCH] Update to upstream 5.2.0.1 hotfix release --- .gitignore | 1 + ...kcm-kwindecoration-fix-blackqml-view.patch | 183 ------------------ kwin.spec | 15 +- sources | 2 +- 4 files changed, 9 insertions(+), 192 deletions(-) delete mode 100644 kwin-kcm-kwindecoration-fix-blackqml-view.patch diff --git a/.gitignore b/.gitignore index e6269f6..4789bfa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /kwin-5.1.1.tar.xz /kwin-5.1.95.tar.xz /kwin-5.2.0.tar.xz +/kwin-5.2.0.1.tar.xz diff --git a/kwin-kcm-kwindecoration-fix-blackqml-view.patch b/kwin-kcm-kwindecoration-fix-blackqml-view.patch deleted file mode 100644 index 1629639..0000000 --- a/kwin-kcm-kwindecoration-fix-blackqml-view.patch +++ /dev/null @@ -1,183 +0,0 @@ -From: Marco Martin -Date: Wed, 28 Jan 2015 08:58:47 +0000 -Subject: use xembed for the qml view of window decorations modul -X-Git-Url: http://quickgit.kde.org/?p=kwin.git&a=commitdiff&h=63885cc5b3f2922441dac0af96ed001b737e78ea ---- -use xembed for the qml view of window decorations modul - -the only way to ensure the view won't randomly become black -(probably QQuickwidget won't be fixed in qt anytime soon or -ever in 5.x lifetime due to how architecturally is) - -basically systemsettings has no control of what gets loaded in, -if one other kcm will call winId(), this one will break. - -BUG:341971 ---- - ---- a/kcmkwin/kwindecoration/kcm.cpp -+++ b/kcmkwin/kwindecoration/kcm.cpp -@@ -36,6 +36,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -77,21 +78,26 @@ ConfigurationModule::ConfigurationModule(QWidget *parent, const QVariantList &ar - m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); - connect(m_ui->filter, &QLineEdit::textChanged, m_proxyModel, &QSortFilterProxyModel::setFilterFixedString); - -+ m_quickView = new QQuickView(0); - KDeclarative::KDeclarative kdeclarative; -- kdeclarative.setDeclarativeEngine(m_ui->view->engine()); -+ kdeclarative.setDeclarativeEngine(m_quickView->engine()); - kdeclarative.setTranslationDomain(QStringLiteral(TRANSLATION_DOMAIN)); - kdeclarative.setupBindings(); - - qmlRegisterType(); -- m_ui->view->rootContext()->setContextProperty(QStringLiteral("decorationsModel"), m_proxyModel); -+ QWidget *widget = QWidget::createWindowContainer(m_quickView, this); -+ QVBoxLayout* layout = new QVBoxLayout(m_ui->view); -+ layout->addWidget(widget); -+ -+ m_quickView->rootContext()->setContextProperty(QStringLiteral("decorationsModel"), m_proxyModel); - updateColors(); -- m_ui->view->rootContext()->setContextProperty("_borderSizesIndex", 3); // 3 is normal -- m_ui->view->rootContext()->setContextProperty("configurationModule", this); -- m_ui->view->rootContext()->setContextProperty("titleFont", QFontDatabase::systemFont(QFontDatabase::TitleFont)); -- m_ui->view->setResizeMode(QQuickWidget::SizeRootObjectToView); -- m_ui->view->setSource(QUrl::fromLocalFile(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kwin/kcm_kwindecoration/main.qml")))); -- if (m_ui->view->status() == QQuickWidget::Ready) { -- auto listView = m_ui->view->rootObject()->findChild("listView"); -+ m_quickView->rootContext()->setContextProperty("_borderSizesIndex", 3); // 3 is normal -+ m_quickView->rootContext()->setContextProperty("configurationModule", this); -+ m_quickView->rootContext()->setContextProperty("titleFont", QFontDatabase::systemFont(QFontDatabase::TitleFont)); -+ m_quickView->setResizeMode(QQuickView::SizeRootObjectToView); -+ m_quickView->setSource(QUrl::fromLocalFile(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kwin/kcm_kwindecoration/main.qml")))); -+ if (m_quickView->status() == QQuickView::Ready) { -+ auto listView = m_quickView->rootObject()->findChild("listView"); - if (listView) { - connect(listView, SIGNAL(currentIndexChanged()), this, SLOT(changed())); - } -@@ -122,7 +128,7 @@ ConfigurationModule::ConfigurationModule(QWidget *parent, const QVariantList &ar - ); - connect(m_ui->borderSizesCombo, static_cast(&QComboBox::currentIndexChanged), - this, [this] (int index) { -- auto listView = m_ui->view->rootObject()->findChild("listView"); -+ auto listView = m_quickView->rootObject()->findChild("listView"); - if (listView) { - listView->setProperty("borderSizesIndex", index); - } -@@ -265,7 +271,7 @@ void ConfigurationModule::load() - const QString plugin = config.readEntry("library", s_defaultPlugin); - const QString theme = config.readEntry("theme", QString()); - const QModelIndex index = m_proxyModel->mapFromSource(m_model->findDecoration(plugin, theme)); -- if (auto listView = m_ui->view->rootObject()->findChild("listView")) { -+ if (auto listView = m_quickView->rootObject()->findChild("listView")) { - listView->setProperty("currentIndex", index.isValid() ? index.row() : -1); - } - m_ui->closeWindowsDoubleClick->setChecked(config.readEntry("CloseOnDoubleClickOnMenu", false)); -@@ -305,7 +311,7 @@ void ConfigurationModule::save() - KConfigGroup config = KSharedConfig::openConfig("kwinrc")->group(s_pluginName); - config.writeEntry("CloseOnDoubleClickOnMenu", m_ui->closeWindowsDoubleClick->isChecked()); - config.writeEntry("BorderSize", sizeToString(m_ui->borderSizesCombo->currentData().value())); -- if (auto listView = m_ui->view->rootObject()->findChild("listView")) { -+ if (auto listView = m_quickView->rootObject()->findChild("listView")) { - const int currentIndex = listView->property("currentIndex").toInt(); - if (currentIndex != -1) { - const QModelIndex index = m_proxyModel->index(currentIndex, 0); -@@ -333,7 +339,7 @@ void ConfigurationModule::save() - - void ConfigurationModule::defaults() - { -- if (auto listView = m_ui->view->rootObject()->findChild("listView")) { -+ if (auto listView = m_quickView->rootObject()->findChild("listView")) { - const QModelIndex index = m_proxyModel->mapFromSource(m_model->findDecoration(s_defaultPlugin)); - listView->setProperty("currentIndex", index.isValid() ? index.row() : -1); - } -@@ -346,7 +352,7 @@ void ConfigurationModule::showKNS(const QString &config) - { - QPointer downloadDialog = new KNS3::DownloadDialog(config, this); - if (downloadDialog->exec() == QDialog::Accepted && !downloadDialog->changedEntries().isEmpty()) { -- auto listView = m_ui->view->rootObject()->findChild("listView"); -+ auto listView = m_quickView->rootObject()->findChild("listView"); - QString selectedPluginName; - QString selectedThemeName; - if (listView) { -@@ -396,8 +402,8 @@ bool ConfigurationModule::eventFilter(QObject *watched, QEvent *e) - - void ConfigurationModule::updateColors() - { -- m_ui->view->setClearColor(m_ui->view->palette().color(QPalette::Window)); -- m_ui->view->rootContext()->setContextProperty("highlightColor", QPalette().color(QPalette::Highlight)); -+ m_quickView->rootContext()->setContextProperty("backgroundColor", QPalette().color(QPalette::Window)); -+ m_quickView->rootContext()->setContextProperty("highlightColor", QPalette().color(QPalette::Highlight)); - } - - } ---- a/kcmkwin/kwindecoration/kcm.h -+++ b/kcmkwin/kwindecoration/kcm.h -@@ -25,6 +25,7 @@ - #include - - class QSortFilterProxyModel; -+class QQuickView; - - namespace KDecoration2 - { -@@ -73,6 +74,7 @@ private: - DecorationsModel *m_model; - QSortFilterProxyModel *m_proxyModel; - ConfigurationForm *m_ui; -+ QQuickView *m_quickView; - Preview::ButtonsModel *m_leftButtons; - Preview::ButtonsModel *m_rightButtons; - Preview::ButtonsModel *m_availableButtons; ---- a/kcmkwin/kwindecoration/kcm.ui -+++ b/kcmkwin/kwindecoration/kcm.ui -@@ -39,16 +39,13 @@ - - - -- -+ - - - 0 - 0 - - -- -- QQuickWidget::SizeRootObjectToView -- - - - ---- a/kcmkwin/kwindecoration/qml/main.qml -+++ b/kcmkwin/kwindecoration/qml/main.qml -@@ -21,12 +21,16 @@ import QtQuick 2.1 - import QtQuick.Controls 1.2 - import QtQuick.Layouts 1.1 - --ColumnLayout { -- Previews { -- Layout.fillWidth: true -- Layout.fillHeight: true -- } -- Buttons { -- Layout.fillWidth: true -+Rectangle { -+ color: backgroundColor -+ ColumnLayout { -+ anchors.fill: parent -+ Previews { -+ Layout.fillWidth: true -+ Layout.fillHeight: true -+ } -+ Buttons { -+ Layout.fillWidth: true -+ } - } - } diff --git a/kwin.spec b/kwin.spec index bbe259f..5bedc56 100644 --- a/kwin.spec +++ b/kwin.spec @@ -2,10 +2,11 @@ # NOTE: Does not build on F20 due to too old Wayland and requires kf5-kwayland, # which is not available in Fedora yet %global wayland 0 +%global plasma_version 5.2.0 Name: kwin -Version: 5.2.0 -Release: 3%{?dist} +Version: 5.2.0.1 +Release: 1%{?dist} Summary: KDE Window manager # all sources are effectively GPLv2+, except for: @@ -20,10 +21,7 @@ URL: https://projects.kde.org/projects/kde/workspace/kwin %else %global stable stable %endif -Source0: http://download.kde.org/%{stable}/plasma/%{version}/%{name}-%{version}.tar.xz - -# Upstream patches -Patch0: kwin-kcm-kwindecoration-fix-blackqml-view.patch +Source0: http://download.kde.org/%{stable}/plasma/%{plasma_version}/%{name}-%{version}.tar.xz # Base BuildRequires: kf5-rpm-macros @@ -129,8 +127,6 @@ BuildArch: noarch %prep %setup -q -n %{name}-%{version} -%patch0 -p1 -b .kcmkwindeco - %build mkdir -p %{_target_platform} @@ -212,6 +208,9 @@ fi %changelog +* Wed Jan 28 2015 Daniel Vrátil - 5.2.0.1-1 +- Update to upstream hotfix release 5.2.0.1 (kwindeco KCM bugfix) + * Wed Jan 28 2015 Daniel Vrátil - 5.2.0-3 - add upstream patch for bug #341971 - fixes Window decorations KCM diff --git a/sources b/sources index 027e70a..58d91e8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8cd36de677f1b550e927d3622da8396b kwin-5.2.0.tar.xz +47b6ce31b45450fa702098c9f3f5ac95 kwin-5.2.0.1.tar.xz