rpms/kdebase-workspace/F-10 kdebase-workspace-4.2.0-kde#177123.patch, NONE, 1.1 kdebase-workspace-4.2.0-pykde4.patch, NONE, 1.1 kdebase-workspace.spec, 1.157, 1.158
Rex Dieter
rdieter at fedoraproject.org
Fri Feb 20 12:52:57 UTC 2009
Author: rdieter
Update of /cvs/pkgs/rpms/kdebase-workspace/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20389
Modified Files:
kdebase-workspace.spec
Added Files:
kdebase-workspace-4.2.0-kde#177123.patch
kdebase-workspace-4.2.0-pykde4.patch
Log Message:
sync w/devel
kdebase-workspace-4.2.0-kde#177123.patch:
--- NEW FILE kdebase-workspace-4.2.0-kde#177123.patch ---
--- branches/KDE/4.2/kdebase/workspace/krunner/screensaver/xautolock.cpp 2009/01/26 15:13:13 916961
+++ branches/KDE/4.2/kdebase/workspace/krunner/screensaver/xautolock.cpp 2009/01/26 15:14:05 916962
@@ -228,7 +228,9 @@
#ifdef HAVE_DPMS
BOOL on;
CARD16 state;
+ CARD16 timeout1, timeout2, timeout3;
DPMSInfo( QX11Info::display(), &state, &on );
+ DPMSGetTimeouts( QX11Info::display(), &timeout1, &timeout2, &timeout3 );
// kDebug() << "DPMSInfo " << state << on;
// If DPMS is active, it makes XScreenSaverQueryInfo() report idle time
@@ -237,7 +239,10 @@
// this could prevent locking from working.
if(state == DPMSModeStandby || state == DPMSModeSuspend || state == DPMSModeOff)
activate = true;
- if(!on && mDPMS) {
+ // If we are DPMS-dependent and either DPMS is turned off completely or all
+ // three DPMS modes are turned off, don't activate (apps use this to turn off
+ // screensavers).
+ if(mDPMS && (!on || (timeout1 == 0 && timeout2 == 0 && timeout3 == 0 ))) {
activate = false;
resetTrigger();
}
--- branches/KDE/4.2/kdebase/workspace/krunner/lock/lockprocess.cc 2009/01/26 15:17:22 916963
+++ branches/KDE/4.2/kdebase/workspace/krunner/lock/lockprocess.cc 2009/01/26 15:18:52 916964
@@ -1104,7 +1104,6 @@
return; // no resuming with dialog visible or when not visible
if( mSuspended && mHackProc.state() == QProcess::Running )
{
- XForceScreenSaver(QX11Info::display(), ScreenSaverReset );
QPainter p( this );
p.drawPixmap( 0, 0, mSavedScreen );
p.end();
--- branches/KDE/4.2/kdebase/workspace/krunner/screensaver/saverengine.cpp 2009/01/26 15:17:22 916963
+++ branches/KDE/4.2/kdebase/workspace/krunner/screensaver/saverengine.cpp 2009/01/26 15:18:52 916964
@@ -46,7 +46,11 @@
// Save X screensaver parameters
XGetScreenSaver(QX11Info::display(), &mXTimeout, &mXInterval,
&mXBlanking, &mXExposures);
- // ... and disable it
+ // And disable it. The internal X screensaver is not used at all, but we use its
+ // internal idle timer (and it is also used by DPMS support in X). This timer must not
+ // be altered by this code, since e.g. resetting the counter after activating our
+ // screensaver would prevent DPMS from activating. We use the timer merely to detect
+ // user activity.
XSetScreenSaver(QX11Info::display(), 0, mXInterval, mXBlanking, mXExposures);
mState = Waiting;
@@ -87,7 +91,6 @@
void SaverEngine::Lock()
{
- bool ok = true;
if (mState == Waiting)
{
startLockProcess( ForceLock );
@@ -125,6 +128,7 @@
void SaverEngine::SimulateUserActivity()
{
+ XForceScreenSaver( QX11Info::display(), ScreenSaverReset );
if ( mXAutoLock && mState == Waiting )
{
mXAutoLock->resetTrigger();
@@ -323,6 +327,8 @@
//
void SaverEngine::idleTimeout()
{
+ if( mState != Waiting )
+ return; // already saving
startLockProcess( DefaultLock );
}
--- branches/KDE/4.2/kdebase/workspace/krunner/screensaver/xautolock.cpp 2009/01/26 15:17:22 916963
+++ branches/KDE/4.2/kdebase/workspace/krunner/screensaver/xautolock.cpp 2009/01/26 15:18:52 916964
@@ -83,8 +83,10 @@
mActive = false;
mTimerId = startTimer( CHECK_INTERVAL );
+ // This is an internal clock timer (in seconds), used instead of querying system time.
+ // It is incremented manually, preventing from problems with clock jumps.
+ // In other words, this is the 'now' time and the reference point for other times here.
mElapsed = 0;
-
}
//---------------------------------------------------------------------------
@@ -126,8 +128,6 @@
{
mActive = true;
resetTrigger();
- XSetScreenSaver(QX11Info::display(), mTimeout + 10, 100, PreferBlanking, DontAllowExposures); // We'll handle blanking
- kDebug() << "XSetScreenSaver" << mTimeout + 10;
}
//---------------------------------------------------------------------------
@@ -138,8 +138,6 @@
{
mActive = false;
resetTrigger();
- XSetScreenSaver(QX11Info::display(), 0, 100, PreferBlanking, DontAllowExposures); // No blanking at all
- kDebug() << "XSetScreenSaver 0";
}
//---------------------------------------------------------------------------
@@ -148,12 +146,15 @@
//
void XAutoLock::resetTrigger()
{
+ // Time of the last user activity (used only when the internal XScreensaver
+ // idle counter is not available).
mLastReset = mElapsed;
+ // Time when screensaver should be activated.
mTrigger = mElapsed + mTimeout;
#ifdef HAVE_XSCREENSAVER
mLastIdle = 0;
#endif
- XForceScreenSaver( QX11Info::display(), ScreenSaverReset );
+ // Do not reset the internal X screensaver here (no XForceScreenSaver())
}
//---------------------------------------------------------------------------
@@ -205,6 +206,9 @@
if (mMitInfo)
{
Display *d = QX11Info::display();
+ // Check user idle time. If it is smaller than before, it is either
+ // clock jump or user activity, so reset the trigger time. Checking whether
+ // there is user inactivity timeout is done below using mTrigger and mElapsed.
XScreenSaverQueryInfo(d, DefaultRootWindow(d), mMitInfo);
if (mLastIdle < mMitInfo->idle)
mLastIdle = mMitInfo->idle;
@@ -218,12 +222,11 @@
bool activate = false;
- // kDebug() << now << mTrigger;
+ // This is the test whether to activate screensaver. If we have reached the time
+ // and for the whole timeout period there was no activity (which would change mTrigger
+ // again), activate.
if (mElapsed >= mTrigger)
- {
- resetTrigger();
activate = true;
- }
#ifdef HAVE_DPMS
BOOL on;
@@ -237,6 +240,8 @@
// that is always smaller than DPMS timeout (X bug I guess). So if DPMS
// saving is active, simply always activate our saving too, otherwise
// this could prevent locking from working.
+ // X.Org 7.4: With this version activating DPMS resets the screensaver idle timer,
+ // so keep this. It probably makes sense to always do this anyway.
if(state == DPMSModeStandby || state == DPMSModeSuspend || state == DPMSModeOff)
activate = true;
// If we are DPMS-dependent and either DPMS is turned off completely or all
--- branches/KDE/4.2/kdebase/workspace/krunner/screensaver/xautolock.cpp 2009/01/26 15:21:51 916966
+++ branches/KDE/4.2/kdebase/workspace/krunner/screensaver/xautolock.cpp 2009/01/26 15:22:44 916967
@@ -253,10 +253,15 @@
}
#endif
-#ifdef HAVE_XSCREENSAVER
- if (mMitInfo && mMitInfo->state == ScreenSaverDisabled)
- activate = false;
-#endif
+ // Do not check whether internal X screensaver is enabled or disabled, since we
+ // have disabled it ourselves. Some apps might try to disable it too to prevent
+ // screensavers, but then our logic breaks[*]. Those apps need to disable DPMS anyway,
+ // or they will still have problems, so the DPMS code above should be enough.
+ // Besides, I doubt other screensaver implementations check this either.
+ // [*] We can't run with X screensaver enabled, since then sooner or later
+ // the internal screensaver will activate instead of our screensaver and we cannot
+ // prevent its activation by resetting the idle counter since that would also
+ // reset DPMS saving.
if(mActive && activate)
emit timeout();
--- branches/KDE/4.2/kdebase/workspace/krunner/screensaver/saverengine.cpp 2009/02/07 12:33:52 922627
+++ branches/KDE/4.2/kdebase/workspace/krunner/screensaver/saverengine.cpp 2009/02/07 12:35:42 922628
@@ -67,6 +67,24 @@
SIGNAL(serviceOwnerChanged(QString,QString,QString)),
SLOT(serviceOwnerChanged(QString,QString,QString)));
+ // Also receive updates triggered through the DBus (from powerdevil) see Bug #177123
+ QStringList modules;
+ QDBusInterface kdedInterface("org.kde.kded", "/kded", "org.kde.kded");
+ QDBusReply<QStringList> reply = kdedInterface.call("loadedModules");
+
+ if (!reply.isValid()) {
+ return;
+ }
+
+ modules = reply.value();
+
+ if (modules.contains("powerdevil")) {
+ if (!QDBusConnection::sessionBus().connect("org.kde.kded", "/modules/powerdevil", "org.kde.PowerDevil",
+ "DPMSconfigUpdated", this, SLOT(configure()))) {
+ kDebug() << "error!";
+ }
+ }
+
// I make it a really random number to avoid
// some assumptions in clients, but just increase
// while gnome-ss creates a random number every time
--- branches/KDE/4.2/kdebase/workspace/powerdevil/daemon/CMakeLists.txt 2009/02/07 12:33:52 922627
+++ branches/KDE/4.2/kdebase/workspace/powerdevil/daemon/CMakeLists.txt 2009/02/07 12:35:42 922628
@@ -17,11 +17,11 @@
kde4_add_kcfg_files(kded_powerdevil_SRCS ../PowerDevilSettings.kcfgc)
set(screensaver_xml "${KDEBASE_WORKSPACE_SOURCE_DIR}/krunner/dbus/org.freedesktop.ScreenSaver.xml")
-set(kscreensaver_xml ${KDEBASE_WORKSPACE_SOURCE_DIR}/krunner/dbus/org.kde.screensaver.xml)
+#set(kscreensaver_xml ${KDEBASE_WORKSPACE_SOURCE_DIR}/krunner/dbus/org.kde.screensaver.xml)
set(ksmserver_xml ${KDEBASE_WORKSPACE_SOURCE_DIR}/ksmserver/org.kde.KSMServerInterface.xml)
qt4_add_dbus_interface(kded_powerdevil_SRCS ${screensaver_xml} screensaver_interface )
-qt4_add_dbus_interface(kded_powerdevil_SRCS ${kscreensaver_xml} kscreensaver_interface )
+#qt4_add_dbus_interface(kded_powerdevil_SRCS ${kscreensaver_xml} kscreensaver_interface )
qt4_add_dbus_interface(kded_powerdevil_SRCS ${ksmserver_xml} ksmserver_interface )
qt4_add_dbus_adaptor( kded_powerdevil_SRCS org.kde.PowerDevil.xml PowerDevilDaemon.h PowerDevilDaemon )
--- branches/KDE/4.2/kdebase/workspace/powerdevil/daemon/PowerDevilDaemon.cpp 2009/02/07 12:33:52 922627
+++ branches/KDE/4.2/kdebase/workspace/powerdevil/daemon/PowerDevilDaemon.cpp 2009/02/07 12:35:42 922628
@@ -50,7 +50,7 @@
#include <solid/processor.h>
#include "screensaver_interface.h"
-#include "kscreensaver_interface.h"
+//#include "kscreensaver_interface.h"
#include "ksmserver_interface.h"
#include <config-powerdevil.h>
@@ -109,7 +109,8 @@
OrgFreedesktopScreenSaverInterface * screenSaverIface;
OrgKdeKSMServerInterfaceInterface * ksmServerIface;
- OrgKdeScreensaverInterface * kscreenSaverIface;
+// Now we send a signal to trigger the configuration of Kscreensaver (Bug #177123) and we don't need the interface anymore
+// OrgKdeScreensaverInterface * kscreenSaverIface;
KComponentData applicationData;
KSharedConfig::Ptr profilesConfig;
@@ -174,9 +175,13 @@
QDBusConnection::sessionBus(), this);
d->ksmServerIface = new OrgKdeKSMServerInterfaceInterface("org.kde.ksmserver", "/KSMServer",
QDBusConnection::sessionBus(), this);
- d->kscreenSaverIface = new OrgKdeScreensaverInterface("org.freedesktop.ScreenSaver", "/ScreenSaver",
- QDBusConnection::sessionBus(), this);
+ /* Not needed anymore; I am not sure if we will need that in a future, so I leave it here
+ * just in case.
+ *
+ * d->kscreenSaverIface = new OrgKdeScreensaverInterface("org.freedesktop.ScreenSaver", "/ScreenSaver",
+ * QDBusConnection::sessionBus(), this);
+ */
connect(d->notifier, SIGNAL(buttonPressed(int)), this, SLOT(buttonPressed(int)));
connect(d->notifier, SIGNAL(batteryRemainingTimeChanged(int)), this, SLOT(batteryRemainingTimeChanged(int)));
connect(d->lockHandler, SIGNAL(streamCriticalNotification(const QString&, const QString&,
@@ -490,13 +495,13 @@
int suspend = 60 * settings->readEntry("DPMSSuspend").toInt();
int poff = 60 * settings->readEntry("DPMSPowerOff").toInt();
- if (settings->readEntry("DPMSStandbyEnabled", false)) {
+ if (!settings->readEntry("DPMSStandbyEnabled", false)) {
standby = 0;
}
- if (settings->readEntry("DPMSSuspendEnabled", false)) {
+ if (!settings->readEntry("DPMSSuspendEnabled", false)) {
suspend = 0;
}
- if (settings->readEntry("DPMSPowerOffEnabled", false)) {
+ if (!settings->readEntry("DPMSPowerOffEnabled", false)) {
poff = 0;
}
@@ -508,7 +513,8 @@
}
// The screen saver depends on the DPMS settings
- d->kscreenSaverIface->configure();
+ // Emit a signal so that Kscreensaver knows it has to re-configure itself
+ emit DPMSconfigUpdated();
#endif
}
@@ -850,7 +856,7 @@
* We make an intensive use of qMin/qMax here to determine the minimum time.
*/
- kDebug() << "Polling started, idle time is" << idle << "seconds";
+ // kDebug() << "Polling started, idle time is" << idle << "seconds";
KConfigGroup * settings = getCurrentProfile();
@@ -860,7 +866,7 @@
if (!settings->readEntry("dimOnIdle", false) && !settings->readEntry("turnOffIdle", false) &&
settings->readEntry("idleAction").toInt() == None) {
- kDebug() << "Stopping timer";
+ // kDebug() << "Stopping timer";
POLLER_CALL(d->pollLoader->poller(), stopCatchingTimeouts());
return;
}
@@ -885,13 +891,13 @@
minTime = qMin(minTime, minDimTime);
}
- kDebug() << "Minimum time is" << minTime << "seconds";
+ // kDebug() << "Minimum time is" << minTime << "seconds";
if (idle < minTime) {
d->status = NoAction;
int remaining = minTime - idle;
POLLER_CALL(d->pollLoader->poller(), setNextTimeout(remaining * 1000));
- kDebug() << "Nothing to do, next event in" << remaining << "seconds";
+ // kDebug() << "Nothing to do, next event in" << remaining << "seconds";
return;
}
@@ -1302,7 +1308,6 @@
Solid::Control::PowerManager::setBrightness(b);
return;
}
-
Solid::Control::PowerManager::setBrightness(value);
}
@@ -1352,7 +1357,7 @@
}
if (PowerDevilSettings::manageDPMS()) {
- QTimer::singleShot(300, this, SLOT(setUpDPMS()));
+ setUpDPMS();
}
}
--- branches/KDE/4.2/kdebase/workspace/powerdevil/daemon/PowerDevilDaemon.h 2009/02/07 12:33:52 922627
+++ branches/KDE/4.2/kdebase/workspace/powerdevil/daemon/PowerDevilDaemon.h 2009/02/07 12:35:42 922628
@@ -112,8 +112,6 @@
void cleanUpTimer();
- void setUpDPMS();
-
void emitCriticalNotification(const QString &evid, const QString &message = QString(),
const char *slot = 0, const QString &iconname = "dialog-error");
@@ -125,10 +123,13 @@
void stateChanged(int, bool);
void profileChanged(const QString &, const QStringList &);
+ void DPMSconfigUpdated();
private:
void lockScreen();
+ void setUpDPMS();
+
KConfigGroup *getCurrentProfile(bool forcereload = false);
void applyProfile();
--- branches/KDE/4.2/kdebase/workspace/powerdevil/daemon/org.kde.PowerDevil.xml 2009/02/07 12:33:52 922627
+++ branches/KDE/4.2/kdebase/workspace/powerdevil/daemon/org.kde.PowerDevil.xml 2009/02/07 12:35:42 922628
@@ -59,6 +59,7 @@
<arg type="s" direction="out" />
<arg type="as" direction="out" />
</signal>
-
+ <signal name="DPMSconfigUpdated">
+ </signal>
</interface>
-</node>
\ No newline at end of file
+</node>
kdebase-workspace-4.2.0-pykde4.patch:
--- NEW FILE kdebase-workspace-4.2.0-pykde4.patch ---
diff -up kdebase-workspace-4.2.0/CMakeLists.txt.orig kdebase-workspace-4.2.0/CMakeLists.txt
--- kdebase-workspace-4.2.0/CMakeLists.txt.orig 2009-02-18 15:47:51.000000000 +0100
+++ kdebase-workspace-4.2.0/CMakeLists.txt 2009-02-18 15:50:34.000000000 +0100
@@ -59,9 +59,9 @@ endif(PYQT4_FOUND AND PYQT4_VERSION STRL
macro_optional_find_package(PyKDE4)
set(PythonSupport_FOUND FALSE)
-if(PYTHONLIBRARY_FOUND AND SIP_FOUND AND PYQT4_FOUND AND PYKDE4_FOUND)
+if(PYTHONLIBRARY_FOUND)
set(PythonSupport_FOUND TRUE)
-endif(PYTHONLIBRARY_FOUND AND SIP_FOUND AND PYQT4_FOUND AND PYKDE4_FOUND)
+endif(PYTHONLIBRARY_FOUND)
macro_log_feature(PythonSupport_FOUND "Python" "KDE Python support" "http://techbase.kde.org/Development/Languages/Python" FALSE "" "Needed to build plasma scriptengine for Python")
#### End Python support ####
Index: kdebase-workspace.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdebase-workspace/F-10/kdebase-workspace.spec,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -r1.157 -r1.158
--- kdebase-workspace.spec 16 Feb 2009 04:40:02 -0000 1.157
+++ kdebase-workspace.spec 20 Feb 2009 12:52:27 -0000 1.158
@@ -8,7 +8,7 @@
Name: kdebase-workspace
Version: 4.2.0
-Release: 10%{?dist}
+Release: 13%{?dist}
Source0: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/kdebase-workspace-%{version}.tar.bz2
License: GPLv2
Group: User Interface/Desktops
@@ -28,6 +28,7 @@
Patch9: kdebase-workspace-4.1.80-session-button.patch
Patch11: kdebase-workspace-4.1.96-font.patch
Patch12: kdebase-workspace-4.2.0-default_applets.patch
+Patch13: kdebase-workspace-4.2.0-pykde4.patch
# upstream patches:
# trunk
@@ -44,6 +45,8 @@
# http://websvn.kde.org/?view=rev&revision=915366
# fix shutdown dialog not centered, sometimes entirely off screen (from 4.2.1)
Patch105: kdebase-workspace-4.2.0-kde#181199.patch
+# http://bugs.kde.org.177123 dpms issues
+Patch106: kdebase-workspace-4.2.0-kde#177123.patch
# FIXME: "inconsistent naming System Monitor vs KSysGuard" http://bugs.kde.org/162151
@@ -58,9 +61,6 @@
Requires: kdebase4
%endif
-# for plasmascript bits
-Requires: PyKDE4 >= %{version}
-
# kdmtheme's functionality is now provided by kdebase-workspace itself
Obsoletes: kdmtheme < 1.3
@@ -85,7 +85,6 @@
BuildRequires: qimageblitz-devel
BuildRequires: soprano-devel
BuildRequires: python-devel
-BuildRequires: PyKDE4-devel >= %{version}
BuildRequires: qedje-devel
# used for the Logitech mouse KCM, disabled until #399931 is fixed
# BuildRequires: libusb-devel
@@ -180,7 +179,20 @@
%description -n oxygen-cursor-themes
%{summary}.
+%package googlegadgets
+Summary: Google Desktop Gadgets
+Group: User Interface/Desktops
+Requires: %{name} = %{version}-%{release}
+%description googlegadgets
+%{summary}.
+%package python-applet
+Summary: Plasma widget in Python
+Group: User Interface/Desktops
+Requires: %{name} = %{version}-%{release}
+Requires: PyKDE4 >= %{version}
+%description python-applet
+%{summary}.
%prep
@@ -201,6 +213,7 @@
%patch9 -p1 -b .session-button
%patch11 -p1 -b .font
%patch12 -p1 -b .default_applets
+%patch13 -p1 -b .pykde4
# upstream patches
%patch100 -p1 -b .AllowExternalPaths
@@ -212,6 +225,8 @@
%patch103 -p1 -b .kde#180576
%patch104 -p1 -b .kdm-qt45
%patch105 -p0 -b .kde#181199
+%patch106 -p5 -b .kde#177123
+
%build
@@ -290,7 +305,15 @@
%{_libdir}/strigi/
%{_kde4_libdir}/libkdeinit*.so
%{_kde4_libdir}/kconf_update_bin/*
-%{python_sitearch}/PyKDE4/plasmascript.py*
+# googlegadgets
+%exclude %{_kde4_libdir}/kde4/plasma_package_ggl.so
+%exclude %{_kde4_libdir}/kde4/plasma_scriptengine_ggl.so
+%exclude %{_kde4_datadir}/kde4/apps/plasma/plasmoids/ggl_*
+%exclude %{_kde4_datadir}/kde4/services/plasma-applet-ggl*
+%exclude %{_kde4_datadir}/kde4/services/*googlegadgets.desktop
+# python widget
+%exclude %{_kde4_appsdir}/plasma_scriptengine_python
+%exclude %{_kde4_datadir}/kde4/services/plasma-scriptengine*python.desktop
%files libs
%defattr(-,root,root,-)
@@ -335,8 +358,32 @@
%{_kde4_iconsdir}/Oxygen_Zion/
%{_kde4_iconsdir}/Oxygen_Zion_Big/
+%files googlegadgets
+%defattr(-,root,root,-)
+%{_kde4_libdir}/kde4/plasma_package_ggl.so
+%{_kde4_libdir}/kde4/plasma_scriptengine_ggl.so
+%{_kde4_datadir}/kde4/apps/plasma/plasmoids/ggl_*
+%{_kde4_datadir}/kde4/services/plasma-applet-ggl*
+%{_kde4_datadir}/kde4/services/*googlegadgets.desktop
+
+%files python-applet
+%defattr(-,root,root,-)
+%{python_sitearch}/PyKDE4/plasmascript.py*
+%{_kde4_appsdir}/plasma_scriptengine_python
+%{_kde4_datadir}/kde4/services/plasma-scriptengine*python.desktop
+
%changelog
+* Thu Feb 19 2009 Rex Dieter <rdieter at fedoraproject.org> - 4.2.0-13
+- dpms issues (kdebug#177123)
+
+* Wed Feb 18 2009 Than Ngo <than at redhat.com> - 4.2.0-12
+- drop the BR on PyKDE4, it's just needed for runtime
+- python-applet subpackage
+
+* Tue Feb 17 2009 Than Ngo <than at redhat.com> - 4.2.0-11
+- googlegadgets subpackage
+
* Mon Feb 16 2009 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.2.0-10
- fix shutdown dialog not centered, sometimes entirely off screen (kde#181199)
More information about the fedora-extras-commits
mailing list