From faa64877bfb6ecc8d030e46a3708bdccaa70a9bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 12 Sep 2009 08:01:44 +0000 Subject: [PATCH] Add keybinding for show desktop. No shortcut is set by default. Thanks to Alexander (alex3255) for providing the patch. FEATURE: 182729 svn path=/trunk/KDE/kdebase/workspace/; revision=1022596 --- kwinbindings.cpp | 1 + useractions.cpp | 8 ++++++++ workspace.h | 1 + 3 files changed, 10 insertions(+) diff --git a/kwinbindings.cpp b/kwinbindings.cpp index ecf296f87d..b912d124dd 100644 --- a/kwinbindings.cpp +++ b/kwinbindings.cpp @@ -153,6 +153,7 @@ along with this program. If not, see . DEF( I18N_NOOP("Window to Screen 6"), 0, slotWindowToScreen6() ); DEF( I18N_NOOP("Window to Screen 7"), 0, slotWindowToScreen7() ); DEF( I18N_NOOP("Window to Next Screen"), 0, slotWindowToNextScreen() ); + DEF( I18N_NOOP("Show Desktop"), 0, slotToggleShowDesktop() ); a = actionCollection->addAction( "Group:Desktop Switching" ); a->setText( i18n("Desktop Switching") ); diff --git a/useractions.cpp b/useractions.cpp index 9748b8a2fc..73afcc4e7b 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -1034,6 +1034,14 @@ void Workspace::slotSetupWindowShortcut() performWindowOperation( c, Options::SetupWindowShortcutOp ); } +/*! + Toggles show desktop + */ +void Workspace::slotToggleShowDesktop() + { + setShowingDesktop( !showingDesktop() ); + } + /*! Move window to next desktop */ diff --git a/workspace.h b/workspace.h index dd922ae6a8..9d7a17c496 100644 --- a/workspace.h +++ b/workspace.h @@ -546,6 +546,7 @@ class Workspace : public QObject, public KDecorationDefines void slotWindowToScreen7() { return slotWindowToScreen( 7 ); } void slotSwitchToNextScreen(); void slotWindowToNextScreen(); + void slotToggleShowDesktop(); void slotWindowMaximize(); void slotWindowMaximizeVertical();