rpms/kdebase-workspace/devel kdebase-workspace-4.2.85-ck-shutdown.patch, 1.2, 1.3 kdebase-workspace.spec, 1.363, 1.364
Kevin Kofler
kkofler at fedoraproject.org
Tue Feb 9 13:23:57 UTC 2010
Author: kkofler
Update of /cvs/pkgs/rpms/kdebase-workspace/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19801/devel
Modified Files:
kdebase-workspace.spec
Added Files:
kdebase-workspace-4.2.85-ck-shutdown.patch
Log Message:
* Tue Feb 09 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.4.0-2.1
- use old ck-shutdown patch without the CanStop check on F11 (#562851)
kdebase-workspace-4.2.85-ck-shutdown.patch:
kdisplaymanager.cpp | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
Index: kdebase-workspace-4.2.85-ck-shutdown.patch
===================================================================
RCS file: kdebase-workspace-4.2.85-ck-shutdown.patch
diff -N kdebase-workspace-4.2.85-ck-shutdown.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ kdebase-workspace-4.2.85-ck-shutdown.patch 9 Feb 2010 13:23:57 -0000 1.3
@@ -0,0 +1,63 @@
+diff -up kdebase-workspace-4.2.85/libs/kworkspace/kdisplaymanager.cpp.ck-shutdown kdebase-workspace-4.2.85/libs/kworkspace/kdisplaymanager.cpp
+--- kdebase-workspace-4.2.85/libs/kworkspace/kdisplaymanager.cpp.ck-shutdown 2009-04-28 15:46:11.000000000 +0200
++++ kdebase-workspace-4.2.85/libs/kworkspace/kdisplaymanager.cpp 2009-05-11 22:49:41.000000000 +0200
+@@ -26,6 +26,7 @@
+ #include <QtDBus/QtDBus>
+
+ #include <QRegExp>
++#include <QLatin1String>
+
+ #include <X11/Xauth.h>
+ #include <X11/Xlib.h>
+@@ -85,6 +86,7 @@ KDisplayManager::KDisplayManager() : d(n
+ strcpy( sa.sun_path, "/tmp/.gdm_socket" );
+ if (::connect( d->fd, (struct sockaddr *)&sa, sizeof(sa) )) {
+ ::close( d->fd );
++ DMType = NoDM;
+ d->fd = -1;
+ break;
+ }
+@@ -186,6 +188,21 @@ KDisplayManager::exec( const char *cmd,
+ bool
+ KDisplayManager::canShutdown()
+ {
++ if (DMType == NoDM) {
++ // No DM or newest GDM running, we'll try shutting down through ConsoleKit.
++ // Unfortunately, ConsoleKit won't tell us if we're allowed to do that
++ // (it also depends on whether there are other users logged in on the
++ // system), so we can only check if it's running at all.
++ QDBusConnection systemBus = QDBusConnection::systemBus();
++ if (!systemBus.isConnected())
++ return false;
++ QDBusInterface consoleKit( QLatin1String( "org.freedesktop.ConsoleKit" ),
++ QLatin1String( "/org/freedesktop/ConsoleKit/Manager" ),
++ QLatin1String( "org.freedesktop.ConsoleKit.Manager" ),
++ systemBus );
++ return consoleKit.isValid();
++ }
++
+ if (DMType == OldKDM)
+ return strstr( ctl, ",maysd" ) != 0;
+
+@@ -205,6 +222,21 @@ KDisplayManager::shutdown( KWorkSpace::S
+ if (shutdownType == KWorkSpace::ShutdownTypeNone || shutdownType == KWorkSpace::ShutdownTypeLogout)
+ return;
+
++ if (DMType == NoDM) {
++ // No DM or newest GDM running, try shutting down through ConsoleKit.
++ QDBusConnection systemBus = QDBusConnection::systemBus();
++ if (!systemBus.isConnected())
++ return;
++ QDBusInterface consoleKit( QLatin1String( "org.freedesktop.ConsoleKit" ),
++ QLatin1String( "/org/freedesktop/ConsoleKit/Manager" ),
++ QLatin1String( "org.freedesktop.ConsoleKit.Manager" ),
++ systemBus );
++ if (consoleKit.isValid())
++ consoleKit.call( QLatin1String( shutdownType == KWorkSpace::ShutdownTypeReboot ?
++ "Restart" : "Stop" ) );
++ return;
++ }
++
+ bool cap_ask;
+ if (DMType == NewKDM) {
+ QByteArray re;
Index: kdebase-workspace.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdebase-workspace/devel/kdebase-workspace.spec,v
retrieving revision 1.363
retrieving revision 1.364
diff -u -p -r1.363 -r1.364
--- kdebase-workspace.spec 8 Feb 2010 18:14:12 -0000 1.363
+++ kdebase-workspace.spec 9 Feb 2010 13:23:57 -0000 1.364
@@ -22,7 +22,7 @@
Summary: KDE Workspace
Name: kdebase-workspace
Version: 4.4.0
-Release: 2%{?dist}
+Release: 2%{?dist}.1
License: GPLv2
Group: User Interface/Desktops
@@ -33,7 +33,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version
Patch1: kdebase-workspace-4.3.95-redhat-startkde.patch
Patch2: kdebase-workspace-4.3.98-plasma-konsole.patch
Patch3: kdebase-workspace-4.3.75-show_systemsettings.patch
+%if 0%{?polkit_1}
Patch4: kdebase-workspace-4.3.95-ck-shutdown.patch
+%else
+# old version of the patch without the CanStop check for F11
+# CanStop was added with the PolicyKit1 port of ConsoleKit (0.4.x)
+Patch4: kdebase-workspace-4.2.85-ck-shutdown.patch
+%endif
# 441062: packagekit tools do not show icons correctly on KDE
Patch7: kdebase-workspace-4.0.3-krdb.patch
Patch8: kdebase-workspace-4.2.85-klipper-url.patch
@@ -657,6 +663,9 @@ fi
%changelog
+* Tue Feb 09 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.4.0-2.1
+- use old ck-shutdown patch without the CanStop check on F11 (#562851)
+
* Mon Feb 08 2010 Than Ngo <than at redhat.com> - 4.4.0-2
- apply upstream patch to fix Plasma Memory Leak and High CPU usage
More information about the scm-commits
mailing list