[kupfer] launch: Cycle application windows in focus application



commit 1295bed42e923e3b894f21a66a55d1ef6a3f562d
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Apr 7 05:48:02 2011 +0200

    launch: Cycle application windows in focus application
    
    If an application is already in front, cycle its windows (from back to
    front, otherwise we don't get them all in the cycle).
    
    This will only trigger if the application only has windows on one
    workspace.

 kupfer/launch.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/launch.py b/kupfer/launch.py
index fc724be..d639fc8 100644
--- a/kupfer/launch.py
+++ b/kupfer/launch.py
@@ -272,7 +272,10 @@ class ApplicationsMatcherService (pretty.OutputMixin):
 				focus_windows = workspaces.get(wspc, [])
 				if focus_windows:
 					break
-			pass
+			else:
+				# no windows on other workspaces, so we rotate among
+				# the local ones
+				focus_windows = cur_wspc_windows[:1]
 		self._focus_windows(focus_windows, evttime)
 
 	def _to_front_single(self, application_windows, evttime):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]