> 
> Can you try to set/unset documentMode in DragTabBar::DragTabBar and see what 
> it does?
> 
> JMarc

I’ve inserted setDocumentMode(true/false); and it doesn’t make any difference.

I’ve then set breakpoints in :

QCocoaNativeInterface::setContentBorderEnabled(QWindow *window, bool enable)
and QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set)

but these are never triggered ...

… because the format() you’ve been following is not from QCocoaBackingStore, 
but from QRasterBackingStore, as shown in this stack ...



… and that’s because the code for the QCocoaBackingStore::format() has changed 
between Qt-5.9 and Qt-5.10;
This is the code for Qt-5.10:

QImage::Format QCocoaBackingStore::format() const
{
    if (windowHasUnifiedToolbar())
        return QImage::Format_ARGB32_Premultiplied;

    return QRasterBackingStore::format();
}

=======
The top routine in the stack QSurfaceFormat::hasAlpha() returns:

        return d->alphaBufferSize > 0; (with alphaBufferSize=8)

The latter is set in :

QSurfaceFormat QCocoaWindow::format() const
{
    QSurfaceFormat format = window()->requestedFormat();

    // Upgrade the default surface format to include an alpha channel. The 
default RGB format
    // causes Cocoa to spend an unreasonable amount of time converting it to 
RGBA internally.
    if (format == QSurfaceFormat())
        format.setAlphaBufferSize(8);
    return format;
}

=======

Reply via email to