From 22bb398b3ba83142bf49f6abf47081e5e9e11bef Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Thu, 1 Jun 2023 12:53:38 +0300 Subject: kxkb: re-add custom TDE switching shortcut This commit fixes issue #342. Signed-off-by: Mavridis Philippe --- kxkb/layoutmap.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'kxkb/layoutmap.cpp') 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() -- cgit v1.2.1