#NEWLINE# def remove( self , win , force = False ) : #NEWLINE# #INDENT# self . windows . remove ( win ) #NEWLINE# hadfocus = self . _remove_from_focus_history ( win ) #NEWLINE# win . group = None #NEWLINE# if win . floating : #NEWLINE# #INDENT# nextfocus = self . floating_layout . remove ( win ) #NEWLINE# nextfocus = ( nextfocus or self . currentWindow or self . layout . focus_first ( ) or self . floating_layout . focus_first ( group = self ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for i in self . layouts : #NEWLINE# #INDENT# if ( i is self . layout ) : #NEWLINE# #INDENT# nextfocus = i . remove ( win ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# i . remove ( win ) #NEWLINE# #UNINDENT# #UNINDENT# nextfocus = ( nextfocus or self . floating_layout . focus_first ( group = self ) or self . currentWindow or self . layout . focus_first ( ) ) #NEWLINE# #UNINDENT# if hadfocus : #NEWLINE# #INDENT# self . focus ( nextfocus , warp = True , force = force ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . screen : #NEWLINE# #INDENT# self . layoutAll ( )