latest batch of upstream fixes (kde#344278,kde#354164,kde#351763,kde#354090)

epel9
Rex Dieter 9 years ago
parent 6053f91ee3
commit e1a8359abb

@ -0,0 +1,200 @@
From 484e4be7f66b6f6d4021f6adb4f43531df9649c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= <mgraesslin@kde.org>
Date: Tue, 20 Oct 2015 14:22:05 +0200
Subject: [PATCH 4/6] [kcmkwin/deco] Delay deleting of PreviewBridge
Our decoration is deleted using deleteLater() and that might cause access
to the bridge. Given that we also need to deleteLater() the
PreviewBridge.
To do so the PreviewBridge is no longer directly exposed to QML, but
in a wrapper object which holds the bridge as only element.
BUG: 344278
FIXED-IN: 5.4.3
REVIEW: 125724
---
.../kwindecoration/declarative-plugin/plugin.cpp | 3 +-
.../declarative-plugin/previewbridge.cpp | 14 ++++++++
.../declarative-plugin/previewbridge.h | 42 ++++++++++++++++++++++
kcmkwin/kwindecoration/qml/ButtonGroup.qml | 2 +-
kcmkwin/kwindecoration/qml/Buttons.qml | 4 +--
kcmkwin/kwindecoration/qml/Previews.qml | 8 ++---
6 files changed, 65 insertions(+), 8 deletions(-)
diff --git a/kcmkwin/kwindecoration/declarative-plugin/plugin.cpp b/kcmkwin/kwindecoration/declarative-plugin/plugin.cpp
index 3df73c5..690aa13 100644
--- a/kcmkwin/kwindecoration/declarative-plugin/plugin.cpp
+++ b/kcmkwin/kwindecoration/declarative-plugin/plugin.cpp
@@ -38,7 +38,7 @@ namespace Preview
void Plugin::registerTypes(const char *uri)
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.kwin.private.kdecoration"));
- qmlRegisterType<KDecoration2::Preview::PreviewBridge>(uri, 1, 0, "Bridge");
+ qmlRegisterType<KDecoration2::Preview::BridgeItem>(uri, 1, 0, "Bridge");
qmlRegisterType<KDecoration2::Preview::Settings>(uri, 1, 0, "Settings");
qmlRegisterType<KDecoration2::Preview::PreviewItem>(uri, 1, 0, "Decoration");
qmlRegisterType<KDecoration2::Preview::PreviewButtonItem>(uri, 1, 0, "Button");
@@ -46,6 +46,7 @@ void Plugin::registerTypes(const char *uri)
qmlRegisterType<KDecoration2::Preview::PreviewClient>();
qmlRegisterType<KDecoration2::Decoration>();
qmlRegisterType<KDecoration2::DecorationShadow>();
+ qmlRegisterType<KDecoration2::Preview::PreviewBridge>();
}
}
diff --git a/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp b/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp
index d6d1ef5..7d201f3 100644
--- a/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp
+++ b/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp
@@ -237,5 +237,19 @@ void PreviewBridge::configure()
dialog.exec();
}
+BridgeItem::BridgeItem(QObject *parent)
+ : QObject(parent)
+ , m_bridge(new PreviewBridge())
+{
+ connect(m_bridge, &PreviewBridge::themeChanged, this, &BridgeItem::themeChanged);
+ connect(m_bridge, &PreviewBridge::pluginChanged, this, &BridgeItem::pluginChanged);
+ connect(m_bridge, &PreviewBridge::validChanged, this, &BridgeItem::validChanged);
+}
+
+BridgeItem::~BridgeItem()
+{
+ m_bridge->deleteLater();
+}
+
}
}
diff --git a/kcmkwin/kwindecoration/declarative-plugin/previewbridge.h b/kcmkwin/kwindecoration/declarative-plugin/previewbridge.h
index fc3c9e0..fe366eb 100644
--- a/kcmkwin/kwindecoration/declarative-plugin/previewbridge.h
+++ b/kcmkwin/kwindecoration/declarative-plugin/previewbridge.h
@@ -89,6 +89,48 @@ private:
bool m_valid;
};
+class BridgeItem : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString plugin READ plugin WRITE setPlugin NOTIFY pluginChanged)
+ Q_PROPERTY(QString theme READ theme WRITE setTheme NOTIFY themeChanged)
+ Q_PROPERTY(bool valid READ isValid NOTIFY validChanged)
+ Q_PROPERTY(KDecoration2::Preview::PreviewBridge *bridge READ bridge CONSTANT)
+
+public:
+ explicit BridgeItem(QObject *parent = nullptr);
+ virtual ~BridgeItem();
+
+ void setPlugin(const QString &plugin) {
+ m_bridge->setPlugin(plugin);
+ }
+ QString plugin() const {
+ return m_bridge->plugin();
+ }
+ void setTheme(const QString &theme) {
+ m_bridge->setTheme(theme);
+ }
+ QString theme() const {
+ return m_bridge->theme();
+ }
+ bool isValid() const {
+ return m_bridge->isValid();
+ }
+
+ PreviewBridge *bridge() const {
+ return m_bridge;
+ }
+
+Q_SIGNALS:
+ void pluginChanged();
+ void themeChanged();
+ void validChanged();
+
+private:
+ PreviewBridge *m_bridge;
+
+};
+
}
}
diff --git a/kcmkwin/kwindecoration/qml/ButtonGroup.qml b/kcmkwin/kwindecoration/qml/ButtonGroup.qml
index 1548732..a64f446 100644
--- a/kcmkwin/kwindecoration/qml/ButtonGroup.qml
+++ b/kcmkwin/kwindecoration/qml/ButtonGroup.qml
@@ -37,7 +37,7 @@ ListView {
id: button
property int itemIndex: index
property var buttonsModel: parent.ListView.view.model
- bridge: bridgeItem
+ bridge: bridgeItem.bridge
settings: settingsItem
type: model["button"]
anchors.fill: Drag.active ? undefined : parent
diff --git a/kcmkwin/kwindecoration/qml/Buttons.qml b/kcmkwin/kwindecoration/qml/Buttons.qml
index 7c6997c..33b6f64 100644
--- a/kcmkwin/kwindecoration/qml/Buttons.qml
+++ b/kcmkwin/kwindecoration/qml/Buttons.qml
@@ -32,7 +32,7 @@ Item {
}
KDecoration.Settings {
id: settingsItem
- bridge: bridgeItem
+ bridge: bridgeItem.bridge
}
Rectangle {
anchors.fill: parent
@@ -153,7 +153,7 @@ Item {
KDecoration.Button {
id: availableButton
anchors.centerIn: Drag.active ? undefined : parent
- bridge: bridgeItem
+ bridge: bridgeItem.bridge
settings: settingsItem
type: model["button"]
width: units.iconSizes.small
diff --git a/kcmkwin/kwindecoration/qml/Previews.qml b/kcmkwin/kwindecoration/qml/Previews.qml
index eabc666..bc8c56a 100644
--- a/kcmkwin/kwindecoration/qml/Previews.qml
+++ b/kcmkwin/kwindecoration/qml/Previews.qml
@@ -52,7 +52,7 @@ ScrollView {
}
KDecoration.Settings {
id: settingsItem
- bridge: bridgeItem
+ bridge: bridgeItem.bridge
borderSizesIndex: listView.borderSizesIndex
}
MouseArea {
@@ -67,7 +67,7 @@ ScrollView {
Item {
KDecoration.Decoration {
id: inactivePreview
- bridge: bridgeItem
+ bridge: bridgeItem.bridge
settings: settingsItem
anchors.fill: parent
Component.onCompleted: {
@@ -81,7 +81,7 @@ ScrollView {
}
KDecoration.Decoration {
id: activePreview
- bridge: bridgeItem
+ bridge: bridgeItem.bridge
settings: settingsItem
anchors.fill: parent
Component.onCompleted: {
@@ -107,7 +107,7 @@ ScrollView {
id: configureButton
enabled: model["configureable"]
iconName: "configure"
- onClicked: bridgeItem.configure()
+ onClicked: bridgeItem.bridge.configure()
}
}
}
--
1.9.3

@ -0,0 +1,66 @@
From 76cd1fdc3411142991096adf8da9d7e74536f671 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= <mgraesslin@kde.org>
Date: Wed, 21 Oct 2015 13:23:40 +0200
Subject: [PATCH 5/6] [kcmeffects] Do not use root context properties
Apparently it's not allowed to set root context properties multiple
times. If one goes to systemsettings, opens effects kcm, closes it
and opens it again it crashes due to setting a context property with
same name again.
This change eliminates the need for the context property by modifying
the property of the QML objects directly.
BUG: 354164
BUG: 351763
FIXED-IN: 5.4.3
REVIEW: 125737
---
kcmkwin/kwincompositing/model.cpp | 3 ++-
kcmkwin/kwincompositing/model.h | 2 --
kcmkwin/kwincompositing/qml/EffectView.qml | 1 -
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/kcmkwin/kwincompositing/model.cpp b/kcmkwin/kwincompositing/model.cpp
index 376a779..1caf693 100644
--- a/kcmkwin/kwincompositing/model.cpp
+++ b/kcmkwin/kwincompositing/model.cpp
@@ -609,8 +609,9 @@ void EffectView::init(ViewType type)
}
QString mainFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, path, QStandardPaths::LocateFile);
setResizeMode(QQuickView::SizeRootObjectToView);
- rootContext()->setContextProperty("engine", this);
setSource(QUrl(mainFile));
+ rootObject()->setProperty("color",
+ KColorScheme(QPalette::Active, KColorScheme::Window, KSharedConfigPtr(0)).background(KColorScheme::NormalBackground).color());
connect(rootObject(), SIGNAL(changed()), this, SIGNAL(changed()));
setMinimumSize(initialSize());
connect(rootObject(), SIGNAL(implicitWidthChanged()), this, SLOT(slotImplicitSizeChanged()));
diff --git a/kcmkwin/kwincompositing/model.h b/kcmkwin/kwincompositing/model.h
index a1b2693..5bdabec 100644
--- a/kcmkwin/kwincompositing/model.h
+++ b/kcmkwin/kwincompositing/model.h
@@ -126,8 +126,6 @@ public:
};
EffectView(ViewType type, QWindow *parent = 0);
- Q_INVOKABLE QColor backgroundViewColor() { return KColorScheme(QPalette::Active, KColorScheme::Window, KSharedConfigPtr(0)).background(KColorScheme::NormalBackground).color(); };
-
void save();
void load();
void defaults();
diff --git a/kcmkwin/kwincompositing/qml/EffectView.qml b/kcmkwin/kwincompositing/qml/EffectView.qml
index b8ab25c..ac26925 100644
--- a/kcmkwin/kwincompositing/qml/EffectView.qml
+++ b/kcmkwin/kwincompositing/qml/EffectView.qml
@@ -27,7 +27,6 @@ Rectangle {
signal changed
implicitWidth: col.implicitWidth
implicitHeight: col.implicitHeight
- color: engine.backgroundViewColor()
Component {
id: sectionHeading
--
1.9.3

@ -0,0 +1,58 @@
From 7339e9639ff53955862da74e48d5440ff465dbca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20L=C3=BCbking?= <thomas.luebking@gmail.com>
Date: Thu, 22 Oct 2015 23:46:19 +0200
Subject: [PATCH 6/6] Improve virtual desktop selection for transients
a) When a group-transient is modal, it still needs to be
on the current or all virtual desktops if *any* of the
blocked clients is
BUG: 354090
FIXED-IN: 5.5
b) ignore demanded virtual desktop for transients. Notably modal transients
should appear where their parent is, and not drag that around. All others
also better show up above their parent and not a distant virtual desktop
REVIEW: 125758
---
manage.cpp | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/manage.cpp b/manage.cpp
index 4dd1033..c5f1744 100644
--- a/manage.cpp
+++ b/manage.cpp
@@ -196,8 +196,10 @@ bool Client::manage(xcb_window_t w, bool isMapped)
for (ClientList::ConstIterator it = mainclients.constBegin();
it != mainclients.constEnd();
++it) {
- if (mainclients.count() > 1 && (*it)->isSpecialWindow())
- continue; // Don't consider toolbars etc when placing
+ if (mainclients.count() > 1 && // A group-transient
+ (*it)->isSpecialWindow() && // Don't consider toolbars etc when placing
+ !(info->state() & NET::Modal)) // except when it's modal (blocks specials as well)
+ continue;
maincl = *it;
if ((*it)->isOnCurrentDesktop())
on_current = true;
@@ -213,11 +215,12 @@ bool Client::manage(xcb_window_t w, bool isMapped)
if (maincl)
setOnActivities(maincl->activities());
+ } else { // a transient shall appear on its leader and not drag that around
+ if (info->desktop())
+ desk = info->desktop(); // Window had the initial desktop property, force it
+ if (desktop() == 0 && asn_valid && asn_data.desktop() != 0)
+ desk = asn_data.desktop();
}
- if (info->desktop())
- desk = info->desktop(); // Window had the initial desktop property, force it
- if (desktop() == 0 && asn_valid && asn_data.desktop() != 0)
- desk = asn_data.desktop();
#ifdef KWIN_BUILD_ACTIVITIES
if (Activities::self() && !isMapped && !noborder && isNormalWindow() && !activitiesDefined) {
//a new, regular window, when we're not recovering from a crash,
--
1.9.3

@ -7,7 +7,7 @@
Name: kwin
Version: 5.4.2
Release: 2%{?dist}
Release: 3%{?dist}
Summary: KDE Window manager
# all sources are effectively GPLv2+, except for:
@ -28,6 +28,9 @@ Source0: http://download.kde.org/%{stable}/plasma/%{version}/%{name}-%{version}.
## upstream patches
Patch3: 0003-decorations-Delay-closeWindow-to-next-event-cycle.patch
Patch4: 0004-kcmkwin-deco-Delay-deleting-of-PreviewBridge.patch
Patch5: 0005-kcmeffects-Do-not-use-root-context-properties.patch
Patch6: 0006-Improve-virtual-desktop-selection-for-transients.patch
## upstreamable patches
@ -253,6 +256,9 @@ fi
%changelog
* Fri Oct 23 2015 Rex Dieter <rdieter@fedoraproject.org> 5.4.2-3
- latest batch of upstream fixes (kde#344278,kde#354164,kde#351763,kde#354090)
* Tue Oct 20 2015 Rex Dieter <rdieter@fedoraproject.org> 5.4.2-2
- .spec cosmetics, backport kwin/aurorae crasher fix (kde#346857)

Loading…
Cancel
Save