'Focus the given window
If win is in the group, blur any windows and call ``focus`` on the
layout (in case it wants to track anything), fire focus_change hook and
invoke layoutAll.
Parameters
win :
Window to focus
warp :
Warp pointer to win. This should basically always be True, unless
the focus event is coming from something like EnterNotify, where
the user is actively using the mouse, or on full screen layouts
where only one window is "maximized" at a time, and it doesn\'t make
sense for the mouse to automatically move.'

def focus(self, win, warp=True, force=False):

    if (self.qtile._drag and (not force)):
        return
    if win:
        if (win not in self.windows):
            return
        self.currentWindow = win
        if win.floating:
            for l in self.layouts:
                l.blur()
            self.floating_layout.focus(win)
        else:
            self.floating_layout.blur()
            for l in self.layouts:
                l.focus(win)
        hook.fire('focus_change')
        self.layoutAll(warp)
