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();