private void process(MouseEvent event, boolean mouseMove) {
    if (event.isConsumed()) return;
    if (mouseMove) wasDragged = true; // set dragged state when mouse dragged
    if (myLocation != null && myViewBounds != null) {
      Component content = getContent(event);
      Component view = getView(content);
      if (mouseMove && myCursorType == DEFAULT_CURSOR && jbrMoveSupported(view)) {
        // Enter in move mode only after mouse move, so double click is supported
        JBR.getWindowMove().startMovingTogetherWithMouse((Window)view, mouseButton);
        myLocation = null;
        myViewBounds = null;
        return;
      }

      if (view != null) {
        Rectangle bounds = new Rectangle(myViewBounds);
        int dx = event.getXOnScreen() - myLocation.x;
        int dy = event.getYOnScreen() - myLocation.y;
        if (myCursorType == DEFAULT_CURSOR && view instanceof Frame) {
          int state = ((Frame)view).getExtendedState();
          if (isStateSet(Frame.MAXIMIZED_HORIZ, state)) dx = 0;
          if (isStateSet(Frame.MAXIMIZED_VERT, state)) dy = 0;
        }
        updateBounds(bounds, view, dx, dy);
        Rectangle viewBounds = view.getBounds();
        if (!bounds.equals(viewBounds)) {
          boolean moved = bounds.x != viewBounds.x || bounds.y != viewBounds.y;
          boolean resized = bounds.width != viewBounds.width || bounds.height != viewBounds.height;
          boolean reallyMoveWindow = !moveAfterMouseRelease || !mouseMove;
          if ((moved && reallyMoveWindow) || resized) {
            view.reshape(bounds.x, bounds.y, bounds.width, bounds.height);
            view.invalidate();
            view.validate();
            view.repaint();
            if (moved) notifyMoved();
            if (resized) notifyResized();
          }
        }
      }
      if (!mouseMove) {
        setCursor(content, getPredefinedCursor(DEFAULT_CURSOR));
        myLocation = null;
        if (wasDragged) myViewBounds = null; // no mouse clicked when mouse released after mouse dragged
      }
      event.consume();
    }
    else if (!mouseMove && myViewBounds != null) {
      myViewBounds = null; // consume mouse clicked for consumed mouse released if no mouse dragged
      event.consume();
    }
  }
private void process(MouseEvent event, boolean mouseMove)