diff --git a/kwinbindings.cpp b/kwinbindings.cpp index 3c9f57c47..bb1da5208 100644 --- a/kwinbindings.cpp +++ b/kwinbindings.cpp @@ -97,6 +97,10 @@ 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", I18N_NOOP("Quick Tile Window to the Top"), + 0, slotWindowQuickTileTop); +DEF2("Window Quick Tile Bottom", I18N_NOOP("Quick Tile Window to the Bottom"), + 0, slotWindowQuickTileBottom); 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"), diff --git a/placement.cpp b/placement.cpp index f1be07dd1..46cb9d446 100644 --- a/placement.cpp +++ b/placement.cpp @@ -817,6 +817,22 @@ void Workspace::slotWindowQuickTileRight() active_client->setQuickTileMode(Client::QuickTileRight, true); } +void Workspace::slotWindowQuickTileTop() +{ + if (!active_client) + return; + + active_client->setQuickTileMode(Client::QuickTileTop, true); +} + +void Workspace::slotWindowQuickTileBottom() +{ + if (!active_client) + return; + + active_client->setQuickTileMode(Client::QuickTileBottom, true); +} + void Workspace::slotWindowQuickTileTopLeft() { if (!active_client) { diff --git a/scripting/workspace_wrapper.cpp b/scripting/workspace_wrapper.cpp index 0fda6ccfc..7ce5dd859 100644 --- a/scripting/workspace_wrapper.cpp +++ b/scripting/workspace_wrapper.cpp @@ -144,6 +144,8 @@ SLOTWRAPPER(slotWindowShrinkHorizontal) SLOTWRAPPER(slotWindowShrinkVertical) SLOTWRAPPER(slotWindowQuickTileLeft) SLOTWRAPPER(slotWindowQuickTileRight) +SLOTWRAPPER(slotWindowQuickTileTop) +SLOTWRAPPER(slotWindowQuickTileBottom) SLOTWRAPPER(slotWindowQuickTileTopLeft) SLOTWRAPPER(slotWindowQuickTileTopRight) SLOTWRAPPER(slotWindowQuickTileBottomLeft) diff --git a/scripting/workspace_wrapper.h b/scripting/workspace_wrapper.h index 0d742ea29..9a2582bf9 100644 --- a/scripting/workspace_wrapper.h +++ b/scripting/workspace_wrapper.h @@ -297,6 +297,8 @@ public Q_SLOTS: void slotWindowShrinkVertical(); void slotWindowQuickTileLeft(); void slotWindowQuickTileRight(); + void slotWindowQuickTileTop(); + void slotWindowQuickTileBottom(); void slotWindowQuickTileTopLeft(); void slotWindowQuickTileTopRight(); void slotWindowQuickTileBottomLeft(); diff --git a/workspace.h b/workspace.h index 16fa351e8..0b7389f0a 100644 --- a/workspace.h +++ b/workspace.h @@ -372,6 +372,8 @@ public Q_SLOTS: void slotWindowShrinkVertical(); void slotWindowQuickTileLeft(); void slotWindowQuickTileRight(); + void slotWindowQuickTileTop(); + void slotWindowQuickTileBottom(); void slotWindowQuickTileTopLeft(); void slotWindowQuickTileTopRight(); void slotWindowQuickTileBottomLeft();