'Focus the next window in group.
Method cycles _all_ windows in group regardless if tiled in current
layout or floating. Cycling of tiled and floating windows is not mixed.
The cycling order depends on the current Layout.'

def cmd_next_window(self):

    if (not self.windows):
        return
    if self.currentWindow.floating:
        nxt = (self.floating_layout.focus_next(self.currentWindow) or self.layout.focus_first() or self.floating_layout.focus_first(group=self))
    else:
        nxt = (self.layout.focus_next(self.currentWindow) or self.floating_layout.focus_first(group=self) or self.layout.focus_first())
    self.focus(nxt, True)
