def right_up ( self, event ):
        sizer = self.sizer
        if sizer is not None:
            object = sizer.ObjectAt( event.GetX(), event.GetY(), True )
            if object is not None:
                popup_menu      = None
                window          = self.control
                is_dock_control = isinstance( object, DockControl )

                if (is_dock_control and (object.dockable is not None) and
                    (event.ShiftDown() or event.ControlDown() or
                     event.AltDown())):
                    self._menu_self = object.dockable
                    popup_menu = object.dockable.dockable_menu( object, event )

                if popup_menu is None:
                    self._menu_self = self
                    section         = self.sizer.GetContents()
                    is_splitter     = isinstance( object, DockSplitter )
                    self._object    = object
                    if is_splitter:
                        self._object = object = object.parent
                    group = object
                    if is_dock_control:
                        group = group.parent
                    if sizer.IsMaximizable():
                        min_max_action.name = 'Maximize'
                    else:
                        min_max_action.name = 'Restore'
                    min_max_action.enabled  = is_dock_control
                    undock_action.enabled   = is_dock_control
                    edit_action.enabled     = (not is_splitter)
                    controls                = section.get_controls( False )
                    lock_action.checked     = ((len( controls ) > 0) and
                                               controls[0].locked)
                    save_action.enabled     = (self.id != '')

                    feature_menu = self._get_feature_menu()
                    restore_menu, delete_menu = self._get_layout_menus()
                    popup_menu = Menu( min_max_action,
                                       undock_action,
                                       Separator(),
                                       feature_menu,
                                       #Separator(),
                                       #hide_action,
                                       #show_action,
                                       Separator(),
                                       lock_action,
                                       layout_action,
                                       Separator(),
                                       save_action,
                                       restore_menu,
                                       delete_menu,
                                       Separator(),
                                       edit_action,
                                       name = 'popup' )

                window.PopupMenuXY( popup_menu.create_menu( window, self ),
                                    event.GetX() - 10, event.GetY() - 10 )
                self._object = None

    #---------------------------------------------------------------------------
    #  Handles the mouse moving over the window:
    #---------------------------------------------------------------------------
Handles the right mouse button being released.
dataset/ETHPy150Open enthought/pyface/pyface/dock/dock_window.py/DockWindow.right_up