summaryrefslogtreecommitdiffstats
path: root/kxkb/layoutmap.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2023-06-01 12:53:38 +0300
committerMavridis Philippe <mavridisf@gmail.com>2023-06-14 14:19:31 +0300
commit4e428e11c5858b5a2485af135cbb2fabd8a3522f (patch)
treeea5edb36e57eb9cbe0621c6b030d66b602c3c1d2 /kxkb/layoutmap.cpp
parente4e948060df1bb40207cc62b0d231f3b147c7b16 (diff)
downloadtdebase-4e428e11c5858b5a2485af135cbb2fabd8a3522f.tar.gz
tdebase-4e428e11c5858b5a2485af135cbb2fabd8a3522f.zip
kxkb: re-add custom TDE switching shortcut
This commit fixes issue #342. Signed-off-by: Mavridis Philippe <mavridisf@gmail.com> (cherry picked from commit 22bb398b3ba83142bf49f6abf47081e5e9e11bef)
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()