[SCM] QtCurve packaging branch, master, updated. debian/1.8.18+git20160320-3d8622c-2-2-g11c836c
Boris Pek
tehnick at moszumanska.debian.org
Wed May 11 20:57:14 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/qtcurve.git;a=commitdiff;h=6f2abad
The following commit has been merged in the master branch:
commit 6f2abada781fb14e50adf21cd62b5cb311b54953
Author: Boris Pek <tehnick-8 at yandex.ru>
Date: Wed May 11 23:49:24 2016 +0300
Add workaround-for-kwin-x11-crashes.patch. (Closes: #823674)
---
debian/patches/series | 1 +
.../patches/workaround-for-kwin-x11-crashes.patch | 189 +++++++++++++++++++++
2 files changed, 190 insertions(+)
diff --git a/debian/patches/series b/debian/patches/series
index 52247e6..02dc5d0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
enable-translations.patch
fix-segfault-in-qt4-style-on-mouse-move-to-window-title.patch
+workaround-for-kwin-x11-crashes.patch
diff --git a/debian/patches/workaround-for-kwin-x11-crashes.patch b/debian/patches/workaround-for-kwin-x11-crashes.patch
new file mode 100644
index 0000000..9b54500
--- /dev/null
+++ b/debian/patches/workaround-for-kwin-x11-crashes.patch
@@ -0,0 +1,189 @@
+Forwarded: no
+Last-Update: 2016-05-11
+Author: Boris Pek <tehnick-8 at mail.ru>
+Bug: https://bugs.kde.org/show_bug.cgi?id=362907
+Bug-Debian: https://bugs.debian.org/823674
+Description: Temporary workaround for kwin_x11 crashes
+ This patch only reverts commits 3d8622c and ef70fff (see upstream git repo).
+
+
+diff --git a/qt5/style/qtcurve.cpp b/qt5/style/qtcurve.cpp
+--- a/qt5/style/qtcurve.cpp
++++ b/qt5/style/qtcurve.cpp
+@@ -21,7 +21,6 @@
+ *****************************************************************************/
+
+ #include "qtcurve_p.h"
+-#include "qtcurve_plugin.h"
+ #include <qtcurve-utils/qtprops.h>
+
+ #include <QDBusConnection>
+@@ -347,7 +346,7 @@
+ m_windowManager(new WindowManager(this)),
+ m_blurHelper(new BlurHelper(this)),
+ m_shortcutHandler(new ShortcutHandler(this)),
+- m_dbusConnected(nullptr)
++ m_dbusConnected(false)
+ {
+ const char *env = getenv(QTCURVE_PREVIEW_CONFIG);
+ if (env && strcmp(env, QTCURVE_PREVIEW_CONFIG) == 0) {
+@@ -659,9 +658,7 @@
+ {
+ if (m_dbusConnected)
+ return;
+- m_dbusConnected = registerCleanup([] (void *data) {
+- reinterpret_cast<Style*>(data)->disconnectDBus();
+- }, this);
++ m_dbusConnected = true;
+ auto bus = QDBusConnection::sessionBus();
+ bus.connect(QString(), "/KGlobalSettings", "org.kde.KGlobalSettings",
+ "notifyChange", this, SLOT(kdeGlobalSettingsChange(int, int)));
+@@ -688,23 +685,28 @@
+ {
+ if (!m_dbusConnected)
+ return;
+- void *cb = m_dbusConnected;
+- m_dbusConnected = nullptr;
+- unregisterCleanup(cb);
++ m_dbusConnected = false;
+ auto bus = QDBusConnection::sessionBus();
+ bus.disconnect(QString(), "/KGlobalSettings", "org.kde.KGlobalSettings",
+ "notifyChange",
+ this, SLOT(kdeGlobalSettingsChange(int, int)));
+ bus.disconnect("org.kde.kwin", "/KWin", "org.kde.KWin", "compositingToggled",
+ this, SLOT(compositingToggled()));
+- bus.disconnect("org.kde.kwin", "/QtCurve", "org.kde.QtCurve",
+- "borderSizesChanged", this, SLOT(borderSizesChanged()));
+- bus.disconnect("org.kde.kwin", "/QtCurve", "org.kde.QtCurve",
+- "toggleMenuBar",
+- this, SLOT(toggleMenuBar(unsigned int)));
+- bus.disconnect("org.kde.kwin", "/QtCurve", "org.kde.QtCurve",
+- "toggleStatusBar",
+- this, SLOT(toggleStatusBar(unsigned int)));
++
++ if (!qApp || qApp->arguments()[0] != "kwin") {
++ bus.disconnect("org.kde.kwin", "/QtCurve", "org.kde.QtCurve",
++ "borderSizesChanged", this, SLOT(borderSizesChanged()));
++ if (opts.menubarHiding & HIDE_KWIN)
++ bus.disconnect("org.kde.kwin", "/QtCurve", "org.kde.QtCurve",
++ "toggleMenuBar",
++ this, SLOT(toggleMenuBar(unsigned int)));
++
++ if (opts.statusbarHiding & HIDE_KWIN) {
++ bus.disconnect("org.kde.kwin", "/QtCurve", "org.kde.QtCurve",
++ "toggleStatusBar",
++ this, SLOT(toggleStatusBar(unsigned int)));
++ }
++ }
+ }
+
+ Style::~Style()
+diff --git a/qt5/style/qtcurve.h b/qt5/style/qtcurve.h
+--- a/qt5/style/qtcurve.h
++++ b/qt5/style/qtcurve.h
+@@ -509,7 +509,6 @@
+ const QStyleOption *option,
+ QPainter *painter,
+ const QWidget *widget) const;
+- static void dbusCleanupCallback(void*);
+
+ private:
+ mutable Options opts;
+@@ -560,7 +559,7 @@
+ WindowManager *m_windowManager;
+ BlurHelper *m_blurHelper;
+ ShortcutHandler *m_shortcutHandler;
+- void *m_dbusConnected;
++ bool m_dbusConnected;
+ };
+ }
+
+diff --git a/qt5/style/qtcurve_plugin.cpp b/qt5/style/qtcurve_plugin.cpp
+--- a/qt5/style/qtcurve_plugin.cpp
++++ b/qt5/style/qtcurve_plugin.cpp
+@@ -27,7 +27,6 @@
+ #include <qtcurve-utils/qtprops.h>
+ #include <qtcurve-utils/x11shadow.h>
+ #include <qtcurve-utils/x11blur.h>
+-#include <qtcurve-utils/log.h>
+
+ #include <QApplication>
+
+@@ -44,49 +43,6 @@
+
+ namespace QtCurve {
+
+-// Using a `std::set` somehow result in a segfault in glibc (maybe realated to
+-// this function being called in the exit handler?) so use a home made solution
+-// instead...
+-struct CleanupCallback {
+- void (*func)(void*);
+- void *data;
+- CleanupCallback *next;
+- CleanupCallback **prev;
+-};
+-
+-static CleanupCallback *cleanup_callbacks = nullptr;
+-
+-void*
+-registerCleanup(void (*func)(void*), void *data)
+-{
+- auto cb = new CleanupCallback{func, data, cleanup_callbacks,
+- &cleanup_callbacks};
+- if (cleanup_callbacks)
+- cleanup_callbacks->prev = &cb->next;
+- cleanup_callbacks = cb;
+- return cb;
+-}
+-
+-void
+-unregisterCleanup(void *_cb)
+-{
+- auto cb = (CleanupCallback*)_cb;
+- if (cb->next)
+- cb->next->prev = cb->prev;
+- *cb->prev = cb->next;
+- delete cb;
+-}
+-
+-static void
+-runAllCleanups()
+-{
+- while (cleanup_callbacks) {
+- auto func = cleanup_callbacks->func;
+- auto data = cleanup_callbacks->data;
+- func(data);
+- }
+-}
+-
+ __attribute__((hot)) static void
+ polishQuickControl(QObject *obj)
+ {
+@@ -164,7 +120,6 @@
+
+ StylePlugin::~StylePlugin()
+ {
+- runAllCleanups();
+ QInternal::unregisterCallback(QInternal::EventNotifyCallback,
+ qtcEventCallback);
+ }
+@@ -185,5 +140,4 @@
+ #endif
+ });
+ }
+-
+ }
+diff --git a/qt5/style/qtcurve_plugin.h b/qt5/style/qtcurve_plugin.h
+--- a/qt5/style/qtcurve_plugin.h
++++ b/qt5/style/qtcurve_plugin.h
+@@ -36,10 +36,6 @@
+ void init();
+ std::once_flag m_ref_flag;
+ };
+-
+-void *registerCleanup(void (*func)(void*), void *data);
+-void unregisterCleanup(void *handle);
+-
+ }
+
+ #endif
--
QtCurve packaging
More information about the pkg-kde-commits
mailing list