Add key bindings to move current window to next/previous desktop
svn path=/trunk/kdebase/kwin/; revision=96538
This commit is contained in:
parent
f3afb04224
commit
10baa96bc7
3 changed files with 30 additions and 0 deletions
|
@ -33,6 +33,8 @@
|
|||
keys->insertItem(i18n("Window raise"),"Window raise", "");
|
||||
keys->insertItem(i18n("Window lower"),"Window lower", "");
|
||||
keys->insertItem(i18n("Window raise-or-lower"), "Toggle raise and lower", "");
|
||||
keys->insertItem(i18n("Window to next desktop"),"Window to next desktop", "");
|
||||
keys->insertItem(i18n("Window to previous desktop"),"Window to previous desktop", "");
|
||||
|
||||
keys->insertItem(i18n("Walk through desktops"),"Walk through desktops", "CTRL+Tab");
|
||||
keys->insertItem(i18n("Walk back through desktops"),"Walk back through desktops", "SHIFT+CTRL+Tab");
|
||||
|
|
|
@ -2388,6 +2388,8 @@ void Workspace::createKeybindings(){
|
|||
keys->connectItem( "Window raise", this, SLOT( slotWindowRaise() ) );
|
||||
keys->connectItem( "Window lower", this, SLOT( slotWindowLower() ) );
|
||||
keys->connectItem( "Toggle raise and lower", this, SLOT( slotWindowRaiseOrLower() ) );
|
||||
keys->connectItem( "Window to next desktop", this, SLOT( slotWindowNextDesktop() ) );
|
||||
keys->connectItem( "Window to previous desktop", this, SLOT( slotWindowPreviousDesktop() ) );
|
||||
|
||||
keys->connectItem( "Walk through desktops", this, SLOT( slotWalkThroughDesktops()));
|
||||
keys->connectItem( "Walk back through desktops", this, SLOT( slotWalkBackThroughDesktops()));
|
||||
|
@ -2568,6 +2570,29 @@ void Workspace::slotWindowRaiseOrLower()
|
|||
raiseOrLowerClient( popup_client );
|
||||
}
|
||||
|
||||
/*!
|
||||
Move window to next desktop
|
||||
*/
|
||||
void Workspace::slotWindowNextDesktop(){
|
||||
int d = currentDesktop() + 1;
|
||||
if ( d > numberOfDesktops() )
|
||||
d = 1;
|
||||
if (popup_client)
|
||||
sendClientToDesktop(popup_client,d);
|
||||
setCurrentDesktop(d);
|
||||
}
|
||||
|
||||
/*!
|
||||
Move window to previous desktop
|
||||
*/
|
||||
void Workspace::slotWindowPreviousDesktop(){
|
||||
int d = currentDesktop() - 1;
|
||||
if ( d <= 0 )
|
||||
d = numberOfDesktops();
|
||||
if (popup_client)
|
||||
sendClientToDesktop(popup_client,d);
|
||||
setCurrentDesktop(d);
|
||||
}
|
||||
|
||||
/*!
|
||||
Invokes keyboard mouse emulation
|
||||
|
|
|
@ -250,6 +250,9 @@ public slots:
|
|||
void slotWindowMove();
|
||||
void slotWindowResize();
|
||||
|
||||
void slotWindowNextDesktop();
|
||||
void slotWindowPreviousDesktop();
|
||||
|
||||
void slotMouseEmulation();
|
||||
|
||||
void slotResetAllClientsDelayed();
|
||||
|
|
Loading…
Reference in a new issue