@Override
  protected void processDrag(@NotNull MouseEvent event, @NotNull Point targetScreenPoint, @NotNull Point startPointScreen) {
    if (!tabs.getTabListOptions$intellij_platform_ide().isTabDraggingEnabled || !isDragSource(event) || !MouseDragHelper.checkModifiers(event)) {
      return;
    }

    SwingUtilities.convertPointFromScreen(startPointScreen, tabs);

    if (isDragJustStarted()) {
      TabLabel pressedTabLabel = SoftReference.dereference(myPressedTabLabel);
      if (pressedTabLabel == null) return;

      final Rectangle labelBounds = pressedTabLabel.getBounds();

      myHoldDelta = new Dimension(startPointScreen.x - labelBounds.x, startPointScreen.y - labelBounds.y);
      dragSource = pressedTabLabel.getInfo();
      dragRec = new Rectangle(startPointScreen, labelBounds.getSize());
      dragOriginalRec = (Rectangle)dragRec.clone();

      dragOriginalRec.x -= myHoldDelta.width;
      dragOriginalRec.y -= myHoldDelta.height;

      TabInfo.DragDelegate delegate = dragSource.getDragDelegate();
      if (delegate != null) {
        delegate.dragStarted(event);
      }
    }
    else {
      if (dragRec == null) return;

      final Point toPoint = SwingUtilities.convertPoint(event.getComponent(), event.getPoint(), tabs);

      dragRec.x = toPoint.x;
      dragRec.y = toPoint.y;
    }

    dragRec.x -= myHoldDelta.width;
    dragRec.y -= myHoldDelta.height;

    final Rectangle headerRec = tabs.getLastLayoutPass().getHeaderRectangle();
    ScreenUtil.moveToFit(dragRec, headerRec, null);

    int deadZoneX = 0;
    int deadZoneY = 0;

    final TabLabel top = findLabel(new Point(dragRec.x + dragRec.width / 2, dragRec.y + deadZoneY));
    final TabLabel bottom = findLabel(new Point(dragRec.x + dragRec.width / 2, dragRec.y + dragRec.height - deadZoneY));
    final TabLabel left = findLabel(new Point(dragRec.x + deadZoneX, dragRec.y + dragRec.height / 2));
    final TabLabel right = findLabel(new Point(dragRec.x + dragRec.width - deadZoneX, dragRec.y + dragRec.height / 2));


    TabLabel targetLabel;
    if (tabs.isHorizontalTabs()) {
      targetLabel = findMostOverlapping(Axis.X, left, right);
      if (targetLabel == null) {
        targetLabel = findMostOverlapping(Axis.Y, top, bottom);
      }
    } else {
      targetLabel = findMostOverlapping(Axis.Y, top, bottom);
      if (targetLabel == null) {
        targetLabel = findMostOverlapping(Axis.X, left, right);
      }
    }

    if (targetLabel != null) {
      Rectangle saved = dragRec;
      dragRec = null;
      tabs.reallocate(dragSource, targetLabel.getInfo());
      dragOriginalRec = Objects.requireNonNull(tabs.getTabLabel(dragSource)).getBounds();
      dragRec = saved;
      tabs.moveDraggedTabLabel();
    }
    else {
      tabs.moveDraggedTabLabel();
      final int border = tabs.getBorderThickness();
      headerRec.x -= border;
      headerRec.y -= border;
      headerRec.width += border * 2;
      headerRec.height += border * 2;
      tabs.repaint(headerRec);
    }
    event.consume();
  }
@Override
  protected void processDrag(@NotNull MouseEvent event, @NotNull Point targetScreenPoint, @NotNull Point startPointScreen)