summaryrefslogtreecommitdiffstats
path: root/kxkb/layoutmap.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2023-06-01 12:53:38 +0300
committerMavridis Philippe <[email protected]>2023-06-14 14:18:24 +0300
commit22bb398b3ba83142bf49f6abf47081e5e9e11bef (patch)
tree4783649fb76eb12aac34fb9342e8e8205de616d9 /kxkb/layoutmap.cpp
parentbcd2bfcdc49dcf97b730889d5554b15623072a40 (diff)
downloadtdebase-22bb398b3ba83142bf49f6abf47081e5e9e11bef.tar.gz
tdebase-22bb398b3ba83142bf49f6abf47081e5e9e11bef.zip
kxkb: re-add custom TDE switching shortcut
This commit fixes issue #342. Signed-off-by: Mavridis Philippe <[email protected]>
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()