diff --git a/kwinbindings.cpp b/kwinbindings.cpp index fd23915a16..0a2c1fc290 100644 --- a/kwinbindings.cpp +++ b/kwinbindings.cpp @@ -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"), diff --git a/placement.cpp b/placement.cpp index a578803864..0f3d4d3926 100644 --- a/placement.cpp +++ b/placement.cpp @@ -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(); diff --git a/workspace.h b/workspace.h index 34ca651f21..fe97c776c4 100644 --- a/workspace.h +++ b/workspace.h @@ -764,6 +764,10 @@ public slots: void slotWindowShrinkVertical(); void slotWindowQuickTileLeft(); void slotWindowQuickTileRight(); + void slotWindowQuickTileTopLeft(); + void slotWindowQuickTileTopRight(); + void slotWindowQuickTileBottomLeft(); + void slotWindowQuickTileBottomRight(); void slotWalkThroughDesktops(); void slotWalkBackThroughDesktops();