def process_event(self, module_name, event, default_event=False):
        """
        Process the event for the named module.
        Events may have been declared in i3status.conf, modules may have
        on_click() functions. There is a default middle click event etc.
        """

        # get the module that the event is for
        module_info = self.output_modules.get(module_name)

        # if module is a py3status one call it.
        if module_info["type"] == "py3status":
            module = module_info["module"]
            module.click_event(event)
            if self.config["debug"]:
                self.py3_wrapper.log("dispatching event {}".format(event))

            # to make the bar more responsive to users we refresh the module
            # unless the on_click event called py3.prevent_refresh()
            if not module.prevent_refresh:
                self.py3_wrapper.refresh_modules(module_name)
                default_event = False

        if default_event:
            # default button 2 action is to clear this method's cache
            if self.config["debug"]:
                self.py3_wrapper.log("dispatching default event {}".format(event))
            self.py3_wrapper.refresh_modules(module_name)

        # find container that holds the module and call its onclick
        module_groups = self.py3_config[".module_groups"]
        containers = module_groups.get(module_name, [])
        for container in containers:
            self.process_event(container, event)
def process_event ( self , module_name , event , default_event = False ) : module_info = self . output_modules . get ( module_name ) if module_info [ "type" ] == "py3status" : module = module_info [ "module" ] module . click_event ( event ) if self . config [ "debug" ] : self . py3_wrapper . log ( "dispatching event {}" . format ( event ) ) if not module . prevent_refresh : self . py3_wrapper . refresh_modules ( module_name ) default_event = False if default_event : if self . config [ "debug" ] : self . py3_wrapper . log ( "dispatching default event {}" . format ( event ) ) self . py3_wrapper . refresh_modules ( module_name ) module_groups = self . py3_config [ ".module_groups" ] containers = module_groups . get ( module_name , [ ] ) for container in containers : self . process_event ( container , event )
Process the event for the named module.
        Events may have been declared in i3status.conf, modules may have
        on_click() functions. There is a default middle click event etc.