From 336667733efd789806fde2e524cbd16c87ec85cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 17 Dec 2002 16:09:08 +0000 Subject: [PATCH] keyboard shortcuts for always-on-top & on-all-desktops (#49083). svn path=/trunk/kdebase/kwin/; revision=194462 --- kwinbindings.cpp | 2 ++ workspace.cpp | 12 ++++++++++++ workspace.h | 2 ++ 3 files changed, 16 insertions(+) diff --git a/kwinbindings.cpp b/kwinbindings.cpp index 9e2c76f88c..7aaefc1732 100644 --- a/kwinbindings.cpp +++ b/kwinbindings.cpp @@ -30,6 +30,8 @@ DEF( I18N_NOOP("Window Resize"), 0, 0, slotWindowResize() ); DEF( I18N_NOOP("Window Raise"), 0, 0, slotWindowRaise() ); DEF( I18N_NOOP("Window Lower"), 0, 0, slotWindowLower() ); + DEF( I18N_NOOP("Window Sticky"), 0, 0, slotWindowSticky() ); + DEF( I18N_NOOP("Window Stays On Top"), 0, 0, slotWindowStaysOnTop() ); DEF( I18N_NOOP("Toggle Window Raise/Lower"), 0, 0, slotWindowRaiseOrLower() ); keys->insert( "Group:Window Desktop", i18n("Window & Desktop") ); diff --git a/workspace.cpp b/workspace.cpp index 49c3b76467..3ac68adeda 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -2823,6 +2823,18 @@ void Workspace::slotWindowRaiseOrLower() raiseOrLowerClient( active_client ); } +void Workspace::slotWindowSticky() +{ + if( active_client ) + active_client->toggleSticky(); +} + +void Workspace::slotWindowStaysOnTop() +{ + if( active_client ) + performWindowOperation( active_client, Options::StaysOnTopOp ); +} + /*! Move window to next desktop */ diff --git a/workspace.h b/workspace.h index 33b5d05d67..a97e88ca45 100644 --- a/workspace.h +++ b/workspace.h @@ -304,6 +304,8 @@ public slots: void slotWindowClose(); void slotWindowMove(); void slotWindowResize(); + void slotWindowStaysOnTop(); + void slotWindowSticky(); void slotWindowToNextDesktop(); void slotWindowToPreviousDesktop();