def mousePressEvent(self, event):
        event.ignore()
        state = self.frame_state
        geo = self.titleBarGeometry()
        if geo.isValid() and geo.contains(event.pos()):
            if self.titleBarMousePressEvent(event):
                if self.isWindow():
                    self.activateWindow()
                    self.raise_()
                event.accept()
                state.mouse_title = True
                return
        if self.isWindow() and event.button() == Qt.LeftButton:
            border, offset = self._resizeBorderTest(event.pos())
            if border != self.NoBorder:
                state.resize_border = border
                state.resize_offset = offset
                state.last_size = self.size()
                event.accept()
Handle the mouse press event for the dock frame.
dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/qt/docking/q_dock_frame.py/QDockFrame.mousePressEvent