def loaded_file_on_right_mouse_release(self, event):
        """Act on mouse right button release.

        Act based on mouse position.
        """
        ### retrieve mouse position
        mouse_pos = event.pos

        ### check nodes for collision, executing its
        ### respective method if so and returning

        for obj in chain(
            APP_REFS.gm.nodes.get_on_screen(),
            APP_REFS.gm.text_blocks.get_on_screen(),
        ):

            if obj.rect.collidepoint(mouse_pos):

                obj.on_right_mouse_release(event)
                break

        ### otherwise, it means the user right-clicked an
        ### empty area in the canvas; in such case, we assume
        ### the user means to invoke to popup menu, so we
        ### take measures to make it happen

        else:

            ### mark the mouse position for the editing
            ### assistant, that is, the position from
            ### where the popup spawned;
            ###
            ### this position is used in case the user
            ### performs a command to add an object to
            ### the canvas, as the position of the object
            ### (we have been using it as the midtop
            ### coordinate of new objects)
            APP_REFS.ea.popup_spawn_pos = event.pos

            ### then give focus to the popup menu

            (self.canvas_popup_menu.focus_if_within_boundaries(event.pos))
Act on mouse right button release.

        Act based on mouse position.
        
nodezator/winman/states/loadedfile.py