Hello community, here is the log from the commit of package kglobalaccel for openSUSE:Factory checked in at 2016-04-01 13:01:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kglobalaccel (Old) and /work/SRC/openSUSE:Factory/.kglobalaccel.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "kglobalaccel" Changes: -------- --- /work/SRC/openSUSE:Factory/kglobalaccel/kglobalaccel.changes 2016-03-16 10:29:24.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kglobalaccel.new/kglobalaccel.changes 2016-04-01 13:01:16.000000000 +0200 @@ -1,0 +2,5 @@ +Sun Mar 27 16:23:16 UTC 2016 - hrvoje.senjan@gmail.com + +- Added 0001-Make-kglobalaccel5-properly-killable-fixing-super-sl.patch + +------------------------------------------------------------------- New: ---- 0001-Make-kglobalaccel5-properly-killable-fixing-super-sl.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kglobalaccel.spec ++++++ --- /var/tmp/diff_new_pack.m5fGza/_old 2016-04-01 13:01:17.000000000 +0200 +++ /var/tmp/diff_new_pack.m5fGza/_new 2016-04-01 13:01:17.000000000 +0200 @@ -48,6 +48,8 @@ Url: http://www.kde.org Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz Source1: baselibs.conf +# PATCH-FIX-UPSTREAM 0001-Make-kglobalaccel5-properly-killable-fixing-super-sl.patch +Patch0: 0001-Make-kglobalaccel5-properly-killable-fixing-super-sl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -105,6 +107,7 @@ %lang_package -n %lname %prep %setup -q +%patch0 -p1 rm -rf po/*/kglobalaccel5.po %build ++++++ 0001-Make-kglobalaccel5-properly-killable-fixing-super-sl.patch ++++++
From 065fb2bab67d19e5a6aa831039f8bd155a28bd70 Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz
Date: Sun, 27 Mar 2016 00:34:54 +0200 Subject: [PATCH 1/1] Make kglobalaccel5 properly killable, fixing super slow shutdown.
One does not just catch signals in a multi-threaded (or really any nontrivial) application. At least since some time, Qt has separate threads for xcb and dbus. This signal catching business caused a deadlock in the main thread, which made kglobalaccel5 survive getting killed by... systemd? Now, when an unplanned signal arrives, just die like a normal process. But when shutting down orderly, actually try to save pending changes. On my Kubuntu 15.10, after an already slow logout, the shutdown splash screen would stay on for a minute or so while systemd didn't dare to shut down the computer - as I figured out, it was because kglobalaccel5 was the last process running from the previous session. So why did kglobalaccel5 not get killed by ksmserver? Apparently, due to some mess involving systemd, there are two session buses and two "unique" instances of kglobalaccel5. One of them is the one that survives. Of course, this also needs to be fixed. It might be just a local problem of mine, though. In any case, this change is also the right thing to do on its own. Also, disable fallback session management. It's just no good :) (This makes no difference for the observed bug.) (cherry picked from commit 9a8866c2a424a29ef06ee6ad594c92c62ac099c3) --- src/runtime/kglobalacceld.cpp | 7 ++++++- src/runtime/main.cpp | 16 ++-------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/runtime/kglobalacceld.cpp b/src/runtime/kglobalacceld.cpp index 3a55ffe..fbb0aa9 100644 --- a/src/runtime/kglobalacceld.cpp +++ b/src/runtime/kglobalacceld.cpp @@ -240,7 +240,12 @@ bool KGlobalAccelD::init() KGlobalAccelD::~KGlobalAccelD() { - GlobalShortcutsRegistry::self()->deactivateShortcuts(); + GlobalShortcutsRegistry *const reg = GlobalShortcutsRegistry::self(); + if (d->writeoutTimer.isActive()) { + d->writeoutTimer.stop(); + reg->writeSettings(); + } + reg->deactivateShortcuts(); delete d; } diff --git a/src/runtime/main.cpp b/src/runtime/main.cpp index 81dbde5..5264ad4 100644 --- a/src/runtime/main.cpp +++ b/src/runtime/main.cpp @@ -37,14 +37,6 @@ static bool isEnabled() return true; } - -static void sighandler(int /*sig*/) -{ - if (qApp) - qApp->quit(); -} - - extern "C" Q_DECL_EXPORT int main(int argc, char **argv) { // Disable Session Management the right way (C) @@ -78,12 +70,8 @@ extern "C" Q_DECL_EXPORT int main(int argc, char **argv) KDBusService service(KDBusService::Unique); app.setQuitOnLastWindowClosed( false ); - - // Stop gracefully - ::signal(SIGINT, sighandler); - ::signal(SIGTERM, sighandler); -#ifndef Q_OS_WIN - ::signal(SIGHUP, sighandler); +#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 1) + QGuiApplication::setFallbackSessionManagementEnabled(false); #endif // Restart on a crash -- 2.6.2