summaryrefslogtreecommitdiffstats
path: root/kdesktop/desktop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop/desktop.cpp')
-rw-r--r--kdesktop/desktop.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/kdesktop/desktop.cpp b/kdesktop/desktop.cpp
index e7681b1f2..fac03a185 100644
--- a/kdesktop/desktop.cpp
+++ b/kdesktop/desktop.cpp
@@ -113,7 +113,7 @@ bool KRootWidget::eventFilter ( TQObject *, TQEvent * e )
else if ( e->type() == TQEvent::Drop )
{
TQDropEvent* de = static_cast<TQDropEvent*>( e );
- if ( KColorDrag::canDecode( de ) )
+ if ( KColorDrag::canDecode( de ) )
emit colorDropEvent( de );
else if ( TQImageDrag::canDecode( de ) )
emit imageDropEvent( de );
@@ -215,7 +215,7 @@ KDesktop::initRoot()
Display *dpy = tqt_xdisplay();
Window root = RootWindow(dpy, kdesktop_screen_number);
XDefineCursor(dpy, root, cursor().handle());
-
+
m_bDesktopEnabled = KDesktopSettings::desktopEnabled();
if ( !m_bDesktopEnabled && !m_pRootWidget )
{
@@ -1064,6 +1064,30 @@ void KDesktop::slotRebootNoCnf()
TDEApplication::ShutdownTypeReboot );
}
+void KDesktop::slotFreeze()
+{
+ DCOPRef r("ksmserver", "ksmserver");
+ r.send("suspend", 1);
+}
+
+void KDesktop::slotSuspend()
+{
+ DCOPRef r("ksmserver", "ksmserver");
+ r.send("suspend", 3);
+}
+
+void KDesktop::slotHibernate()
+{
+ DCOPRef r("ksmserver", "ksmserver");
+ r.send("suspend", 4);
+}
+
+void KDesktop::slotHybridSuspend()
+{
+ DCOPRef r("ksmserver", "ksmserver");
+ r.send("suspend", 5);
+}
+
void KDesktop::setVRoot( bool enable )
{
if ( enable == set_vroot )