summaryrefslogtreecommitdiffstats
path: root/kxkb/layoutmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kxkb/layoutmap.cpp')
-rw-r--r--kxkb/layoutmap.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/kxkb/layoutmap.cpp b/kxkb/layoutmap.cpp
index 636911199..62b44da10 100644
--- a/kxkb/layoutmap.cpp
+++ b/kxkb/layoutmap.cpp
@@ -93,6 +93,19 @@ LayoutState& LayoutMap::getNextLayout() {
return *layoutQueue.head();
}
+LayoutState& LayoutMap::getPrevLayout() {
+ LayoutQueue& layoutQueue = getCurrentLayoutQueue(m_currentWinId);
+ for (int i = 1; i < layoutQueue.count(); ++i) {
+ LayoutState* layoutState = layoutQueue.dequeue();
+ layoutQueue.enqueue(layoutState);
+ }
+
+ kdDebug() << "map: Next layout: " << layoutQueue.head()->layoutUnit.toPair()
+ << " for " << m_currentWinId << endl;
+
+ return *layoutQueue.head();
+}
+
void LayoutMap::setCurrentLayout(const LayoutUnit& layoutUnit) {
LayoutQueue& layoutQueue = getCurrentLayoutQueue(m_currentWinId);
kdDebug() << "map: Storing layout: " << layoutUnit.toPair()