def on_float_change(self, *args, **kwargs):
        """
        hook method which is called if window float state is changed.
        If the current associated window is not floated (any more) the window
        and process is detached from DropDown, thus the next call to Show
        will spawn a new process.
        """
        name = None
        for name, dd in self.dropdowns.items():
            if not dd.window.floating:
                if dd.window.group is not self:
                    dd.unsubscribe()
                    del self.dropdowns[name]
                    break
        self._check_unsubscribe()

        hook method which is called if window float state is changed.
        If the current associated window is not floated (any more) the window
        and process is detached from DropDown, thus the next call to Show
        will spawn a new process.
        
libqtile/scratchpad.py