Add shortcuts for new quick tile modes.

Shortcuts for quick tile to the quarters of the screen
added in 4.6.
Thanks to Arthur Arlt for implementing this feature.
FEATURE: 265461
FIXED-IN: 4.7.0
CCMAIL: arre2000@gmx.de
This commit is contained in:
Martin Gräßlin 2011-02-07 19:19:51 +01:00
parent 95c8ba2035
commit e1c04b7c3e
3 changed files with 44 additions and 0 deletions

View file

@ -122,6 +122,14 @@ DEF2("Window Quick Tile Left", I18N_NOOP("Quick Tile Window to the Left"),
0, slotWindowQuickTileLeft());
DEF2("Window Quick Tile Right", I18N_NOOP("Quick Tile Window to the Right"),
0, slotWindowQuickTileRight());
DEF2("Window Quick Tile Top Left", I18N_NOOP("Quick Tile Window to the Top Left"),
0, slotWindowQuickTileTopLeft());
DEF2("Window Quick Tile Bottom Left", I18N_NOOP("Quick Tile Window to the Bottom Left"),
0, slotWindowQuickTileBottomLeft());
DEF2("Window Quick Tile Top Right", I18N_NOOP("Quick Tile Window to the Top Right"),
0, slotWindowQuickTileTopRight());
DEF2("Window Quick Tile Bottom Right", I18N_NOOP("Quick Tile Window to the Bottom Right"),
0, slotWindowQuickTileBottomRight());
DEF2("Switch Window Up", I18N_NOOP("Switch to Window Above"),
Qt::META + Qt::ALT + Qt::Key_Up, slotSwitchWindowUp());
DEF2("Switch Window Down", I18N_NOOP("Switch to Window Below"),

View file

@ -700,6 +700,38 @@ void Workspace::slotWindowQuickTileRight()
active_client->setQuickTileMode(QuickTileRight, true);
}
void Workspace::slotWindowQuickTileTopLeft()
{
if (!active_client) {
return;
}
active_client->setQuickTileMode(QuickTileTopLeft, true);
}
void Workspace::slotWindowQuickTileTopRight()
{
if (!active_client) {
return;
}
active_client->setQuickTileMode(QuickTileTopRight, true);
}
void Workspace::slotWindowQuickTileBottomLeft()
{
if (!active_client) {
return;
}
active_client->setQuickTileMode(QuickTileBottomLeft, true);
}
void Workspace::slotWindowQuickTileBottomRight()
{
if (!active_client) {
return;
}
active_client->setQuickTileMode(QuickTileBottomRight, true);
}
int Workspace::packPositionLeft(const Client* cl, int oldx, bool left_edge) const
{
int newx = clientArea(MovementArea, cl).left();

View file

@ -764,6 +764,10 @@ public slots:
void slotWindowShrinkVertical();
void slotWindowQuickTileLeft();
void slotWindowQuickTileRight();
void slotWindowQuickTileTopLeft();
void slotWindowQuickTileTopRight();
void slotWindowQuickTileBottomLeft();
void slotWindowQuickTileBottomRight();
void slotWalkThroughDesktops();
void slotWalkBackThroughDesktops();