protected synchronized void onResized(int columns, int rows) 
    {
        TerminalSize newSize = new TerminalSize(columns, rows);
        if(lastKnownSize == null || !lastKnownSize.equals(newSize)) {
            lastKnownSize = newSize;
            for(ResizeListener resizeListener: resizeListeners)
                resizeListener.onResized(lastKnownSize);
        }
    }