From f9c5225e3312c3de76c5c54a9328747ea8bc4d66 Mon Sep 17 00:00:00 2001
From: fluxgen <fluxgen>
Date: Mon, 17 Dec 2001 00:37:42 +0000
Subject: Fixed tabcycling

---
 src/fluxbox.cc | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 53ed03d..b2500e7 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -871,16 +871,24 @@ void Fluxbox::process_event(XEvent *e) {
 								screen->getCurrentWorkspace()->raiseWindow(
 									tab->next()->getWindow());
 								tab->next()->getWindow()->setInputFocus();
-							}
+							} else {
+								screen->getCurrentWorkspace()->raiseWindow(
+									tab->first()->getWindow());
+								tab->first()->getWindow()->setInputFocus();
+							}	
 						}
 						break;						
 					case Keys::grabPrevTab: 
 						if (focused_window && focused_window->getTab()) {
 							Tab *tab = focused_window->getTab();
-							if (tab->prev()) {								
+							if (tab->prev()) {
 								screen->getCurrentWorkspace()->raiseWindow(
 									tab->prev()->getWindow());
 								tab->prev()->getWindow()->setInputFocus();
+							} else {
+								screen->getCurrentWorkspace()->raiseWindow(
+									tab->last()->getWindow());
+								tab->last()->getWindow()->setInputFocus();
 							}
 						}
 						break;
-- 
cgit v0.11.2